message-queue

How to read from multiple queues in real-world?

一曲冷凌霜 提交于 2019-12-06 11:15:14
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 or no real-world practical experience with this: Create a class that spawns 20 threads in the worker

Win32: IProgressDialog will not disappear until you mouse over it

北战南征 提交于 2019-12-06 09:25:02
问题 i'm using the Win32 progress dialog. The damnest thing is that when i call: progressDialog.StopProgressDialog(); it doesn't disappear. It stays on screen until the user moves her mouse over it - then it suddenly disappers. The call to StopProgressDialog returns right away (i.e. it's not a synchronous call). i can prove this by doing things after the call has returned: private void button1_Click(object sender, EventArgs e) { //Force red background to prove we've started this.BackColor = Color

HornetQ Core API and JMS

狂风中的少年 提交于 2019-12-06 08:57:17
问题 I have few questions regarding HornetQ: What are differences between HornetQ core API and the JMS API ? is there any advantage or disadvantage on using one of these ? Is it true to say if I use the core API and then I decide to change my Messaging Bus (let's say to ActiveMQ) then I have to change all my codes ? 回答1: HornetQ Core API is a proprietary API from HornetQ, while the JMS API is a standard API defined by the Java Community Process. There are a few features that are not supported on

How to send integer with message queue with POSIX API in linux?

99封情书 提交于 2019-12-06 08:03:48
I try to send integer by msg queue but the function mq_send(mq, &val , sizeof(val), 0); is working for only char type pointer so is there any way to send integer to queue with another function or same function. Regards... sdg Do not read the char* in this case as the only allowed datatype. Many *ix API use char as a generic buffer pointer. View the interface therefore as taking a pointer to buffer and the size of the buffer. That buffer can be anything you like, from a single int, to a struct, seralized string representation of your class, or just about anything else in memory. int i; mq_send

mq_open() - EACCES, Permission denied

眉间皱痕 提交于 2019-12-06 05:29:55
问题 I'm trying to create a POSIX message queue from a privileged process (waiting for later read), then open this message queue from an unprivileged process (to send message), and the later mq_open() returned: EACCES. If the create process and open process are both privileged or both unprivileged, mq_open will success. I checked the mq_open manual, it says EACCES means the caller does not have permission to open it in the specified mode, but I'm not sure what is 'specified mode'... Create success

Windows Game Loop 50% CPU on Dual Core

≡放荡痞女 提交于 2019-12-06 04:25:53
问题 The game loop alone is using 50% of CPU Usage, I haven't done any rendering work yet. What I'm doing here? while(true) { if(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { if(msg.message == WM_QUIT || msg.message == WM_CLOSE || msg.message == WM_DESTROY) break; TranslateMessage(&msg); DispatchMessage(&msg); } else { //Run game code, break out of loop when the game is over } } 回答1: Classic busy/wait loop. Your CPU is busily checking (and rechecking ad infinitum) for messages. You need to wait for

difference between msgget() and mq_open

那年仲夏 提交于 2019-12-06 04:18:26
问题 I Read about message queue operations such as msgget(), msgsnd() and msgrcv(). But when I was searching for message queue related questions on stack overflow, I came to know there is another set of message queue operations such as mq_open(), mq_send(), mq_receive(). Can any one please let me know what are the differences between these 2 types of message queues and which type of message queues are extensively being used? 回答1: Basicly, msgget , msgsnd , msgrcv are System V IPC, while mq_open ,

Is it possible to mirror a single queue in ActiveMQ?

倾然丶 夕夏残阳落幕 提交于 2019-12-06 04:09:30
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 flowing through your system), or you can't use the feature at all. Is there no way of enabling this

Simple scalable work/message queue with delay

断了今生、忘了曾经 提交于 2019-12-06 02:38:26
问题 I need to set up a job/message queue with the option to set a delay for the task so that it's not picked up immediately by a free worker, but after a certain time (can vary from task to task). I looked into a couple of linux queue solutions (rabbitmq, gearman, memcacheq), but none of them seem to offer this feature out of the box. Any ideas on how I could achieve this? Thanks! 回答1: I've used BeanstalkD to great effect, using the delay option on inserting a new job to wait several seconds till

Designing a component both producer and consumer in Kafka

丶灬走出姿态 提交于 2019-12-06 01:32:47
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 forms a loop on Kafka and my component. This is what bothers me, is this a desired architecture in Kafka?