message-queue

How do you process messages in parallel while ensuring FIFO per entity?

本秂侑毒 提交于 2019-12-17 20:24:18
问题 Let's say you have an entity, say, "Person" in your system and you want to process events that modify various Person entities. It is important that: Events for the same Person are processed in FIFO order Multiple Person event streams be processed in parallel by different threads/processes We have an implementation that solves this using a shared database and locks. Threads compete to acquire the lock for a Person and then process events in order after acquiring the lock. We'd like to move to

Microservice architecture - carry message through services when order doesn't matter

夙愿已清 提交于 2019-12-17 18:42:02
问题 Tl;dr : "How can I push a message through a bunch of asynchronous, unordered microservices and know when that message has made it through each of them?" I'm struggling to find the right messaging system/protocol for a specific microservices architecture. This isn't a "which is best" question, but a question about what my options are for a design pattern/protocol. I have a message on the beginning queue. Let's say a RabbitMQ message with serialized JSON I need that message to go through an

IBM WebSphere MQ request/reply scenario

允我心安 提交于 2019-12-17 16:12:01
问题 I'm currently working on a project where I need to interface with an IBM system which communicates with the outside world through WebSphere MQ. I need to query the system in a "request-response" fashion using queues, and I will be doing this through a queue manager. However, I can't quite get my head around how this works in practical terms. Say I've got multiple instances of the same application which puts a message onto a request queue. The message gets a CorrelationId and MessageId upon

Real world use of JMS/message queues? [closed]

爷,独闯天下 提交于 2019-12-17 06:57:17
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . I was just reading abit about JMS and Apache ActiveMQ. And was wondering what real world use have people here used JMS or similar message queue technologies for ? 回答1: JMS (ActiveMQ is a JMS broker implementation) can be used as a mechanism to allow asynchronous request processing

Azure Service Bus: What's a 'request' and a 'message'?

让人想犯罪 __ 提交于 2019-12-13 13:24:20
问题 In Microsoft Azure, under service bus, you can see activity graphs for the different queues/topics etc. The graph shows various different lines, such as incoming messages , outgoing messages , successful requests etc. What is a Request ? And what is a Message ? Requests seem to be constantly occurring and often significantly large than the number of messages (in topics). Even though the number of servers listening to the queue remains the same - sometimes the number of requests will

Is msgsnd() thread- and/or process-safe?

走远了吗. 提交于 2019-12-13 13:18:56
问题 What happens if two pthreads are calling the msgsnd() function at the "same" time, posting message to the same message queue ? What if two processes do the same ? Does it matter if they are threads or processes ? Specifically interested for Linux 2.6.15-2.5 #1 SMP PREEMPT Tue Sep 19 10:56:25 CDT 2006 x86_64 x86_64 x86_64 GNU/Linux 回答1: The man page for pthreads tells you what you want to know: A thread-safe function is one that can be safely (i.e., it will deliver the same results regardless

Load balancing MessageQ (ActiveMQ)

邮差的信 提交于 2019-12-13 04:44:14
问题 This is my scenario.. 1) A REST based web service (Say X) takes in requests and puts it into ActiveQ 2) There is a listener on the other side of the Q that will read and process the message. This is async I decided to go with ActiveMQ. But trying to find a solution where I can Q and the Q listeners scalable. 1) I have many instances of X running. Hence there are multiple prodders to the Q. 2) Ordering is important to me. 3) Since my REST service is session less, I don't have a way to tag a

Messaging platform

回眸只為那壹抹淺笑 提交于 2019-12-13 03:49:47
问题 We're considering a messaging platform to integrate two core systems in a banking environment. We're looking at open source options. Which products have you used and can you share experiences? 回答1: If you're on Microsoft, I would start your search with MSMQ. I've used MSMQ at work quite a bit and never really had any serious problems with it. WCF has great support for MSMQ if you're using .NET. I've also used Apache ActiveMQ for Java JMS, and had mixed results. It has some really nice tools

SQS distinguish between duplicate and failed/retry messages?

天大地大妈咪最大 提交于 2019-12-13 03:48:43
问题 I am writing an application in Lambda that is invoked by SQS messages. I would like to be able to tell the difference between an invocation resulting from a "duplicate" message vs one resulting from a previous failure/retry (both SQS and Lambda will retry in case of failure). Is the messageId the same for duplicate messages, or just the body? If they are different I might be able to track a messageId against a key from the body to identity duplicates. TIA. 回答1: Ideally, you would want to

Message queues in Perl, PHP, Python

别来无恙 提交于 2019-12-13 03:41:17
问题 I am handling a project which contain message queue concept. Now the project is in PHP, and it's making more delay in message sending or mail sending. So I suggest to develop a message queue in Perl or Python script. Could you please suggest which is best either PHP or Perl or Python? 回答1: A possible solution could be to use Gearman as a queue : Your PHP project would send messages to Gearman, as background jobs ; and finish Gearman would dispatch those messages to workers Workers will deal