message-queue

The queue does not exist or you do not have sufficient permissions to perform the operation. exception while sending message via MSMQ

别等时光非礼了梦想. 提交于 2019-11-30 17:34:02
问题 I have created a function to send message via MSMQ but getting exception while executing. below is my function. public void SendMessageToQueue(ChessQueue chessQueue) { MessageQueue queue = null; Message m = null; if (!MessageQueue.Exists(".\\Private$\\" + chessQueue.QueueName)) { queue = new MessageQueue(".\\Private$\\chessqueue"); chessQueue.Messages = new List<MessageObject>(); chessQueue.Messages.Add(chessQueue.Message); queue.Formatter = new BinaryMessageFormatter(); m = new Message(); m

How can I read messages from a queue in parallel?

泄露秘密 提交于 2019-11-30 16:23:58
Situation We have one message queue. We would like to process messages in parallel and limit the number of simultaneously processed messages. Our trial code below does process messages in parallel, but it only starts a new batch of processes when the previous one is finished. We would like to restart Tasks as they finish. In other words: The maximum number of Tasks should always be active as long as the message queue is not empty. Trial code static string queue = @".\Private$\concurrenttest"; private static void Process(CancellationToken token) { Task.Factory.StartNew(async () => { while (true

How to find a horneq Queue length

怎甘沉沦 提交于 2019-11-30 15:26:19
问题 I am using Hornetq 2.0 i dont understand how can i know how many message are sitting on the queue at the moment. This is a very useful feature so i can know at runtime if my consumer consume message fast enough. I am not using the JMS api but the highly optimised core API. What is the right (fastest) way to get the number of message in the queue ? I found 2 way but don't know what is the proper way to do it. public int size(){ ClientSession session; try { session = sf.createSession(false,

When to use deleteLater

戏子无情 提交于 2019-11-30 14:47:23
问题 Assuming I have the following snippet, is it safe to call deleteLater in qto's destructor for other QT objects it might administer? int main(int argc, char *argv[]) { QApplication a(argc, argv); MyQTObject qto; qto.show(); return a.exec(); } Because I've analyzed similar code like this with a leak detector and all the objects for which deleteLater was called, weren't deallocated correctly unless I replaced the call with a normal delete. If I've understood this correctly, deleteLater only

How to find a horneq Queue length

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 14:35:50
I am using Hornetq 2.0 i dont understand how can i know how many message are sitting on the queue at the moment. This is a very useful feature so i can know at runtime if my consumer consume message fast enough. I am not using the JMS api but the highly optimised core API. What is the right (fastest) way to get the number of message in the queue ? I found 2 way but don't know what is the proper way to do it. public int size(){ ClientSession session; try { session = sf.createSession(false, false, false); ClientRequestor requestor = new ClientRequestor(session, "hornetq.management");

Android Handler Message and ListView

非 Y 不嫁゛ 提交于 2019-11-30 13:44:38
Here's my error: *** Uncaught remote exception! (Exceptions are not yet supported across processes.) android.util.AndroidRuntimeException: { what=1008 when=368280372 } This message is already in use. at android.os.MessageQueue.enqueueMessage(MessageQueue.java:171) at android.os.Handler.sendMessageAtTime(Handler.java:457) at android.os.Handler.sendMessageDelayed(Handler.java:430) at android.os.Handler.sendMessage(Handler.java:367) at android.view.ViewRoot.dispatchAppVisibility(ViewRoot.java:2748) What I'm attempting is to have a listview, that is populated by custom list items, each list item

When to use deleteLater

≯℡__Kan透↙ 提交于 2019-11-30 11:43:01
Assuming I have the following snippet, is it safe to call deleteLater in qto's destructor for other QT objects it might administer? int main(int argc, char *argv[]) { QApplication a(argc, argv); MyQTObject qto; qto.show(); return a.exec(); } Because I've analyzed similar code like this with a leak detector and all the objects for which deleteLater was called, weren't deallocated correctly unless I replaced the call with a normal delete. If I've understood this correctly, deleteLater only registers a deletion event in the QT message queue. Can this be the problem that qto's destructor is called

MSMQ v Database Table

五迷三道 提交于 2019-11-30 11:02:46
问题 An existing process changes the status field of a booking record in a table, in response to user input. I have another process to write, that will run asynchronously for records with a particular status. It will read the table record, perform some operations (including calls to third party web services), and update the record's status field to indicate that processing is completed (or In Error, with an error count). This operation sounds very similar to a queue. What are the benefits and

Is Apache Kafka appropriate for use as an unordered task queue?

☆樱花仙子☆ 提交于 2019-11-30 10:20:20
问题 Kafka splits incoming messages up into partitions, according to the partition assigned by the producer. Messages from partitions then get consumed by consumers in different consumer groups. This architecture makes me wary of using Kafka as a work/task queue, because I have to specify the partition at time of production, which indirectly limits which consumers can work on it because a partition is sent to only one consumer in a consumer group. I would rather not specify the partition ahead of

In a FIFO Qeueing system, what's the best way the to implement priority messaging

谁都会走 提交于 2019-11-30 07:11:27
For message-oriented middleware that does not consistently support priority messages (such as AMQP) what is the best way to implement priority consumption when queues have only FIFO semantics? The general use case would be a system in which consumers receive messages of a higher priority before messages of a lower priority when a large backlog of messages exists in Queue(s). Given only FIFO support for a given single queue, you will of course have to introduce either multiple queues, an intermediary, or have a more complex consumer. Multiple queues could be handled in a couple of ways. The