message-queue

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

我怕爱的太早我们不能终老 提交于 2019-12-08 05:09:50
问题 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

EasyNetQ - How to retry failed messages & persist RetryCount in message body/header?

左心房为你撑大大i 提交于 2019-12-08 04:57:07
问题 I am using EasyNetQ and need to retry failed messages on the original queue. The problem is: even though I successfully increment the TriedCount variable (in the body of every msg), when EasyNetQ publishes the message to the default error queue after an exception, the updated TriedCount is not in the msg! Presumably because it just dumps the original message to the error queue without the consumer's changes. The updated TriedCount works for in-process republishes, but not when republished

ActiveMQ performance in different Operating Systems

可紊 提交于 2019-12-08 03:17:27
I have tested activeMQ JMSProducer in some operating systems. The results are as follows: AIX - Persistent - around 50 messages per second Solaris - Persistent - around 60 messages per second Linux - Persistent - around 500 messages per second Is that normal behaviour because in Linux, it is much much faster? ActiveMQ Performance document is only based on Linux. And, does Slow KahaDB access slow down activeMQ performance? Thanks. With persisted connections you are highly dependant on the performance of your hardware and how the OS will commit write to disk. If you enable the write cache on

Struggling with an empty windows message queue in a console application

风流意气都作罢 提交于 2019-12-08 02:07:52
问题 In the below (compilable) example I'm trying to listen to the windows message queue in a plain console application in order to receive notifications about USB devices being connected/disconnected. I took the sample code from here: Detecting USB insertion/Removal in C++ non-GUI application However, the call to GetMessage in the while -clause never returns, because obviuously Windows does not send any messages to my queue. What am I doing wrong? Does this have anything to do with the UIPI? I'm

How to read from multiple queues in real-world?

ぐ巨炮叔叔 提交于 2019-12-08 01:32:51
问题 Here's a theoretical question: When I'm building an application using message queueing, I'm going to need multiple queues support different data types for different purposes. Let's assume I have 20 queues (e.g. one to create new users, one to process new orders, one to edit user settings, etc.). I'm going to deploy this to Windows Azure using the 'minimum' of 1 web role and 1 worker role. How does one read from all those 20 queues in a proper way? This is what I had in mind, but I have little

C - Problem with message passing between threads using queues

拟墨画扇 提交于 2019-12-08 01:08:46
问题 I'm trying to pass messages between 2 threads using a queue, but I haven't gotten any results so far. When I print the contents of the message after it's received and before it's sent, it only seems to keep its value within the tread. I need to implement it with 1 server thread and multiple client threads, but for now I'm only using 1 of each. Here's my code struct msg //struct for client requests to server { long mtype; int numResources; //number of resources to be requested int ID; //ID

Is it possible to mirror a single queue in ActiveMQ?

不问归期 提交于 2019-12-07 18:58:53
问题 I'm running ActiveMQ in a production system. Some of our queues are very high volume and some are very low volume. I'm interested in mirroring one of the low volume queues so that I can build informal monitoring services around the messages being received. Unfortunately, the only documentation I've been able to find seems to imply that Mirrored Queues are are all-or-nothing: you either create a topic for every single queue you have (and suffer the performance penalty of copying every message

Designing a component both producer and consumer in Kafka

有些话、适合烂在心里 提交于 2019-12-07 18:19:45
问题 I am using Kafka and Zookeeper as the main components of my data pipeline, which is processing thousands of requests each second. I am using Samza as the real time data processing tool for small transformations that I need to make on the data. My problem is that one of my consumers (lets say ConsumerA ) consumes several topics from Kafka and processes them. Basically creating a summary of the topics that are digested. I further want to push this data to Kafka as a separate topic but that

Should an API Gateway Communicate via a Queue or directly to other μServices?

点点圈 提交于 2019-12-07 17:56:54
问题 I was wondering which of my two methods is more appropriate, or is there event another one? (1) Direct Direct communication between GATEWAY and μSERVICE A UI sends HTTP request to GATEWAY GATEWAY sends HTTP request to μSERVICE A μSERVICE A returns either SUCCESS or ERROR Event is stored in EVENT STORE and published to QUEUE PROJECTION DATABASE is updated Other μSERVICES might consume event (2) Events Event-based communication via a message queue UI sends HTTP request to GATEWAY GATEWAY

MSMQ BodyType Integer Allocation

牧云@^-^@ 提交于 2019-12-07 17:56:53
问题 I couldn't find anything about the BodyType-Property (beside the MSDN), especially nothing about the meaning of each integer. So I created messages with BodyTypes = 0...1000 and wrote down the result into an Excel-sheet. I hope this is helpful for someone. 回答1: Maybe there are even more BodyTypes and someone could add them 回答2: Even though the question and answer are two years old, it sometimes helps to dig through the C++ documentation when dealing with obscure MS API's. This is no exception