message-queue

How many events can Node.js queue?

对着背影说爱祢 提交于 2019-12-31 17:24:59
问题 From what I see, if an event in Node take a "long time" to be dispatched, Node creates some kind of "queue of events", and they are triggered as soon as possible, one by one. How long can this queue be? 回答1: While this may seem like a simple question, it is actually a rather complex problem; unfortunately, there's no simple number that anyone can give you. First: wall time doesn't really play a part in anything here. All events are dispatched in the same fashion, whether or not things are

How to do error handling with EasyNetQ / RabbitMQ

梦想与她 提交于 2019-12-31 12:43:08
问题 I'm using RabbitMQ in C# with the EasyNetQ library. I'm using a pub/sub pattern here. I still have a few issues that I hope anyone can help me with: When there's an error while consuming a message, it's automatically moved to an error queue. How can I implement retries (so that it's placed back on the originating queue, and when it fails to process X times, it's moved to a dead letter queue)? As far as I can see there's always 1 error queue that's used to dump messages from all other queues.

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

那年仲夏 提交于 2019-12-30 02:15:48
问题 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). 回答1: Given only FIFO support for a given single queue, you will of course have to introduce either multiple queues, an

Execute a delegate in the ui thread (using message pump)

。_饼干妹妹 提交于 2019-12-29 07:59:13
问题 I have a background thread that handles communication with an external service. Each time the background thread receives a message I'd like to pass it to the UI thread for further processing (displaying to user). Currently I've made a thread safe message queue that is pooled periodically in Timer.Tick and filled in the background thread. But this solution is sub optimal. Do you know how to use message pump to pass events from background thread to ui thread? 回答1: There are a few techniques.

asynchronous processing with PHP - one worker per job

孤街醉人 提交于 2019-12-29 03:34:52
问题 Consider a PHP web application whose purpose is to accept user requests to start generic asynchronous jobs, and then create a worker process/thread to run the job. The jobs are not particularly CPU or memory intensive, but are expected to block on I/O calls fairly often. No more than one or two jobs should be started per second, but due to the long run times there may be many jobs running at once. Therefore, it's of utmost importance that the jobs run in parallel. Also, each job must be

Using many consumers in SQS Queue

ぃ、小莉子 提交于 2019-12-27 11:51:14
问题 I know that it is possible to consume a SQS queue using multiple threads. I would like to guarantee that each message will be consumed once. I know that it is possible to change the visibility timeout of a message, e.g., equal to my processing time. If my process spend more time than the visibility timeout (e.g. a slow connection) other thread can consume the same message. What is the best approach to guarantee that a message will be processed once? 回答1: What is the best approach to guarantee

Using many consumers in SQS Queue

倖福魔咒の 提交于 2019-12-27 11:47:43
问题 I know that it is possible to consume a SQS queue using multiple threads. I would like to guarantee that each message will be consumed once. I know that it is possible to change the visibility timeout of a message, e.g., equal to my processing time. If my process spend more time than the visibility timeout (e.g. a slow connection) other thread can consume the same message. What is the best approach to guarantee that a message will be processed once? 回答1: What is the best approach to guarantee

pickle.PicklingError: Can't pickle '_subprocess_handle' object: <_subprocess_han dle object at 0x00AAAAAAA>

馋奶兔 提交于 2019-12-25 16:24:13
问题 I'm trying to write a test to compare methods for inter process communication in python, and OSX and windows are giving me problem with my first sample. it is pretty much the manual sample for using Queues. i wrote all the code on linux with python 2.7.9 and 3.4.1. And it works fine. #!/usr/bin/env python import multiprocessing as MP ... self.mpq_main = MP.Queue() self.mpq_net = MP.Queue() self.mpt_net = MP.Process( target=self.start_t_net, args=(self.mpq_main, self.mpq_net) ) ... def start_t

C# MSMQ Invalid Operation Exception

会有一股神秘感。 提交于 2019-12-25 08:58:53
问题 I create a basic application to manage MSMQ in C#. I create messages in my trasaction message queue with this method: /// <summary> /// Method to send message in message queue /// </summary> /// <param name="mq">message queue (to)</param> /// <param name="messageBody">message body</param> /// <param name="messageLabel">message label</param> public static void sendMessage(MessageQueue mq, string messageBody, string messageLabel) { MessageQueueTransaction mqt = new MessageQueueTransaction();

Can you publish a message while processing a queue in RabbitMQ .Net Client?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 04:18:12
问题 I have a couple messaging scenarios I need help with using RabbitMQ 2.1.0 in c#... 1) I would like to have a subscriber listening to "raw" queue; then do some preprocessing and publish a new message, such as "preprocessed" to the same exchange. 2) similar to 1 but publish to a different exchange I noticed in the .Net Client User Guide that it says do not call .basicPublish during a callback as it blocks threads. using (IConnection conn = connectionFactory.CreateConnection()) { using (IModel