message-queue

Check the status and result of MSMQ message

混江龙づ霸主 提交于 2019-12-10 10:59:19
问题 I'm working on a RESTfull web service that does the following: On POST request, it starts a long running task. It queues up a message for MSMQ, which is processed in windows service hosted applicaiton. It returns HTTP status code 202 Accepted along with id of the job we queued up. Client application continously polls the service (with GET) with id of the job we just queued up. When the MSMQ client is finished with the task, it should return the result of the operation. If not, it will return

ServiceStack: How to make InMemoryTransientMessageService run in a background

随声附和 提交于 2019-12-10 07:09:09
问题 What needs to be done to make InMemoryTransientMessageService run in a background thread? I publish things inside a service using base.MessageProducer.Publish(new RequestDto()); and they are exececuted immediately inside the service-request. The project is self-hosted. Here is a quick unit test showing the blocking of the current request instead of deferring it to the background: https://gist.github.com/lmcnearney/5407097 回答1: There is nothing out of the box. You would have to build your own.

JMS transaction

蓝咒 提交于 2019-12-10 04:28:36
问题 Database transactions is a familiar concept. try { ... .. updateDB() .. ... commit(); } catch error { rollback(); } if any error occurs any changes made by updateDB will be discarded. I wanted to know what a message queue transaction rollback will undo. try{ ... ... //EDIT: swapped the order of receive and send Message m = queue1.receiveMessage(..) .. .. queue2.sendMessage(..) .. .. commit(); } catch error { rollback(); } specifically, what will rollback do cancel the sending of message un

Retrieve messages from RabbitMQ queue(s)

ⅰ亾dé卋堺 提交于 2019-12-10 03:50:24
问题 I'm looking to implement RabbitMQ into my PHP application, and am using the php-amqp extension. My only question is this, how do I easily query to return the contents of the queue in PHP? php-amqp seems to not enable me to do this. If I am going wrong, please help me out here :) 回答1: James, could you please ask this question on rabbitmq-discuss? Your question touches on what it means to 'query' a queue in order to get messages. In RabbitMQ you consume messages from queues, and perform

MassTransit with RabbitMQ: When is a message moved to the error queue

安稳与你 提交于 2019-12-10 01:06:52
问题 I am using RabbitMQ version 3.0.2 & I see close to 1000 message in Error queue. I want to know At what point messages are moved to the error queues? Is there a way to know why a certain message is being moved to an error queue? Is there any way to move message from error queue to normal queue? Thank you 回答1: a) they fail to deserialize or b) the consumer throws an exception processing that message five times Not really... If you peek at the message in the queue, the payload headers might

Send Message To Another User

那年仲夏 提交于 2019-12-09 23:47:58
问题 I was wondering how to send messages to another user using Progress 4gl. We are trying to cut down on the PA speaker where I work and I want some way to notify a certain user/users of some predefined messages. I'm not sure if this is even possible with Progress, or if there is a message queue that can be used. If anyone has any samples, ideas or has done this before, please let me know. Thanks!! 回答1: You might find this helpful: Following on from presentations in Boston and Finland, dot.r is

successfully posted Runnable only gets executed when parent is invalidated

梦想的初衷 提交于 2019-12-09 23:27:09
问题 I sometimes run into the following scenario : I call View.post(Runnable r) and it returns true when calling android.os.Looper.myLooper().dump(...), the runnable seems not in the messageQueue after calling invalidate on the main layout (for example after 20 seconds), the Runnable gets executed This only happens from time to time, it happens on multiple devices and on multiple Android versions. The problem seems similar to Runnable is posted successfully but not run and Android: Button within

Azure: How to move messages from poison queue to back to main queue?

本小妞迷上赌 提交于 2019-12-09 14:42:35
问题 I'm wondering if there is a tool or lib that can move messages between queues? Currently, i'm doing something like below public static void ProcessQueueMessage([QueueTrigger("myqueue-poison")] string message, TextWriter log) { CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connString); CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient(); CloudQueue queue = queueClient.GetQueueReference("myqueue"); queue.CreateIfNotExists(); var messageData = JsonConvert

Good examples of applications using Message Queues

ぃ、小莉子 提交于 2019-12-09 13:51:13
问题 I would like to learn more about programming messaging applications and using message queues. Things like qpid, Amazon Queues, etc. Can you point me to some apps (preferably C++, open source if possible) so I can learn more. Also, can you tell me the general guidelines one would use to decide whether ot not to use message queues. I am interesting in leanring about this just for the 'coolness' factor but I think it might be beneficial for me in the future. 回答1: RabbitMQ is the Message Queue

How to implement a competing consumer solution?

假如想象 提交于 2019-12-09 08:56:00
问题 As a exercise I'm trying to find an example which implements competing consumer. many producers - > MSMQueue <- competing consumers So far I did not find any documentation on how to achieve this. My first attempt to figure out how is implemented in MassTransit or NServiceBus failed to many layers of indirection. Any help will be greatly appreciated. 回答1: With MassTransit and MSMQ you can achieve this using the Distributor component. Note that if you use MassTransit with RabbitMQ instead of