message-queue

Why NServiceBus OutgoingHeaders is static and not ThreadStatic?

。_饼干妹妹 提交于 2019-12-07 13:24:04
问题 How is NServiceBus maintaining consistency when the outgoing headers is static? Does it mean if I were to set the outgoing headers for a particular message, it will affect all other outgoing messages since it's a singleton? namespace NServiceBus.MessageHeaders { [ComVisible(false)] public class MessageHeaderManager : IMutateOutgoingTransportMessages { private static IDictionary<string, string> staticOutgoingHeaders = (IDictionary<string, string>) new Dictionary<string, string>(); private

Syntax for selecting messages by Jms ID

孤街醉人 提交于 2019-12-07 08:23:41
问题 What is the correct syntax for selecting messages based on their corresponding JMS ID? Currently I use: String selector = "JMSMessageID='ID:305:1:5:1:1'"; messageConsumer = session.createConsumer(getRetryQueue(), selector); The above syntax works in test with a mocked broker. But towards ActiveMQ the messages are not polled. Original code: @Override public Message readMessageFromRetryQueueByJmsId(String jmsId) throws QueueingException { Connection connection = null; Session session = null;

What open source message queuing software provides durability with strict ordering?

ⅰ亾dé卋堺 提交于 2019-12-07 08:00:55
问题 What we need is RabbitMQ that actually works as a queue and doesn't do this. Messages should stay at the head of a queue untill client dequeues them explicitly. It seems like a very straightforward scenario, but for some reason I can't find any broker to support it.. A broker should run on Windows OS. 回答1: Apache Qpid is probably your best option. Of all of the message queues, this one has a number of interesting things going for it, including strict ordering. 回答2: If it is only one message

Architecture of a web application using message queues

不羁岁月 提交于 2019-12-07 02:13:26
I have a java web application which uses some form of custom message queuing via a database table (EmailQueue) to queue delivery of emails. The application is deployed on Tomcat and uses Quartz jobs which polls for new entries in the EmailQueue table to send. I now need to add queuing of a few other types of jobs and messages (notifications, sms, etc.) and am therefore looking into using a proper message queue ( RabbitMQ , ActiveMQ , etc.) instead of the database. This is motivated by a few articles on the matter which argue a database should not be used as a queue. I haven't completely gotten

Why does WebSocket event listeners work if they are registered after events are fired?

橙三吉。 提交于 2019-12-06 22:10:40
According to MDN docs , the WebSocket event listeners are registered after the connection is created, and the process is sequential: // Create WebSocket connection. const socket = new WebSocket('ws://localhost:8080'); // Connection opened socket.addEventListener('open', function (event) { console.log('ws connected'); }); // Listen for messages socket.addEventListener('message', function (event) { console.log('Message from server ', event.data); }); How does this work if events start firing before the listeners were registered? Say, the connection opened before the open listener is registered,

Why is communication via shared memory so much slower than via queues?

蹲街弑〆低调 提交于 2019-12-06 20:07:48
问题 I am using Python 2.7.5 on a recent vintage Apple MacBook Pro which has four hardware and eight logical CPUs; i.e., the sysctl utility gives: $ sysctl hw.physicalcpu hw.physicalcpu: 4 $ sysctl hw.logicalcpu hw.logicalcpu: 8 I need to perform some rather complicated processing on a large 1-D list or array, and then save the result as an intermediate output which will be used again at a later point in a subsequent calculation within my application. The structure of my problem lends itself

Error in implementing message queue using redis, error in using BLPOP

五迷三道 提交于 2019-12-06 17:52:29
I am trying to build a message queue using Redis. Whenever client sends new data, they are added to a list. Here is the code for it $client->lPush("my_queue", $data); Now there is a separate script slave.php which pops the newly arrived data and process it. The code for slave.php while (true) { list($queue, $message) = $client->brPop(["my_queue"], 0); /* Logic to process the data */ } I have modified the apache startup script so that slave.php should start & stop with apache. It works well. But after waiting for few minutes the brPop stops listening with the error message like this : Uncaught

On Windows - where is a mqji.properties for me to use?

时间秒杀一切 提交于 2019-12-06 15:18:50
My application is a stand alone Java app, that customers download, install and run. It uses MQ to communicate with a host, which has been working for years. Neither myself nor customers have anything MQ installed on their Windows machines; we include and use com.ibm.mq.jar to do the work. Apparently though, MQ needs a mqji.properties file in the classpath to prevent this : Unable to load message catalog - mqji com.ibm.mq.MQException: Message catalog not found So my question is : Where do I get one?? Here is a copy of my mqji.properties file. Copy and paste into a text editor. Save as mqji

Kubernetes message consumer scalability

自作多情 提交于 2019-12-06 13:35:46
问题 How To deploy in kubernetes a message consumer for kafka, amqp or any other message broker which scales up and down ? My hypothesis is that the consumer runs a loop which pulls messages. I d like kubernetes To create more pods when many messages arrive in the broker queue and remove some pods when too few messages arrive in the queue. Which component has the initiative of the ending of the pods? The pod itself because it can't fetch a message from the queue? Or kubernetes because the pod

How do I repurpose a window's close button without affecting ALT+F4 or closing it in the taskbar?

放肆的年华 提交于 2019-12-06 11:31:54
I am making a program with native C++ and the WinAPI. This program has a main application window that I want to be somewhat persistent. It seems kind of natural to close a window via the red X button, and I often accidentally press it when I don't actually want to exit the program (this happens to me with Teamspeak). So, I'm trying to repurpose the red X button into a minimize button to avoid accidental exiting. However, my application should have some way to exit the program with standard system controls. I want to allow ALT+F4 and right clicking on the taskbar icon to close. I tried