RabbitMQDemo | : cactus : 基于EasyNetQ操作RabbitMQ的Demo项目 | Pub Sub library
kandi X-RAY | RabbitMQDemo Summary
kandi X-RAY | RabbitMQDemo Summary
:cactus: 基于EasyNetQ操作RabbitMQ的Demo项目
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RabbitMQDemo
RabbitMQDemo Key Features
RabbitMQDemo Examples and Code Snippets
Community Discussions
Trending Discussions on RabbitMQDemo
QUESTION
Here's a simple .net core 1.1 console app. Call it with a -r parameter and it reads all the messages in the rabbitmq Queue, call it with any other parameters, and each parameter is enqueued as a message.
Here's the problem, I can enqueue the messages fine, but all attempts to read the messages result in no messages being read. Clearly I'm not consuming the queue correctly, and would appreciate some guidance.
Thanks!
...ANSWER
Answered 2017-Jul-31 at 13:35- First, use the management UI to ensure that your exchange and queue are set up correctly and that messages have been published to it.
- Second,
ReceiveMessages()
and thus your reader probably returns immediately with an empty array before the event has a chance to fire. You have no code to wait while the consumer receives messages from RabbitMQ. Notice in the tutorial howConsole.ReadLine()
is used. In your example, you can use a synchronization object (ManualResetEvent
) to preventReceiveMessages()
from returning until a certain message count is read.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install RabbitMQDemo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page