messaging

Are there any Python 2.7 alternatives to ZeroMQ that are released under the BSD or MIT license?

梦想的初衷 提交于 2019-12-04 10:16:40
I am seeking Python 2.7 alternatives to ZeroMQ that are released under the BSD or MIT license. I am looking for something that supports request-reply and pub-sub messaging patterns. I can serialize the data myself if necessary. I found Twisted from Twisted Matrix Labs but it appears to require a blocking event loop, i.e. reactor.run(). I need a library that will run in the background and let my application check messages upon certain events. Are there any other alternatives? Give nanomsg , a ZeroMQ younger sister, a try - same father, same beauty Yes, it is licensed under MIT /X11 license. Yes

Design Help – Polymorphic Event Handling

那年仲夏 提交于 2019-12-04 09:40:29
Design Question – Polymorphic Event Handling I’m currently trying to reduce the number of Event Handles in my current project. We have multiple systems that send data over USB. I currently have a routine to read in the messages and parse the initial header details to determine which system the message came from. The headers are a little different, so the EventArgs I created are not the same. Then I notify all “observers” of the change. So what I have right now is the following: public enum Sub1Enums : byte { ID1 = 0x01, ID2 = 0x02 } public enum Sub2Enums : ushort { ID1 = 0xFFFE, ID2 = 0xFFFF }

Signal a rollback from a JMS MessageListener

早过忘川 提交于 2019-12-04 09:11:37
问题 I've been working with JMS and ActiveMQ. Everything is working wonders. I am not using spring, nor can I. The interface javax.jms.MessageListener has only one method, onMessage . From within a implementation, there is a chance an exception will be thrown. If in fact an exception gets thrown, then I say the message wasn't properly processed and needs to be re-tried. So, I need ActiveMQ to wait for a little while and then, retry. i.e. I need the thrown exception to rollback the JMS transaction.

MQ Queue with multiple consumers but only one active

杀马特。学长 韩版系。学妹 提交于 2019-12-04 09:02:12
We have one MQ Queue which receives messages from an external system out of our control. Our system processing the incoming messages is a critical one and needs to be up and running 27x7 no matter what. The order in which the incoming messages are processed is also not negotiable which means we need to process them in exactly the order they arrived. To make sure our system is 100% available we deployed our system to a bunch of physical machines able to process those messages. Once the messages reached our system we put in place a mechanism to make sure the messages processing does not go out

Android, Handler messaging

泪湿孤枕 提交于 2019-12-04 05:52:42
I have some very simple code to do with handlers: Handler seconds=new Handler() { @Override public void handleMessage(Message msg) { bar.incrementProgressBy(5); tView1.setText("r:"+msg); } }; And my thread: Thread seconds_thread=new Thread(new Runnable() { public void run() { try { for (int i=0;i<20 && isRunning.get();i++) { Thread.sleep(1000); Message m = new Message(); Bundle b = new Bundle(); b.putInt("what", 5); // for example m.setData(b); seconds.sendMessage(m); } } catch (Throwable t) { // just end the background thread } } }); As you can see above i am trying to change the value of "

JMS - How do message selectors work with multiple queue and topic consumers?

佐手、 提交于 2019-12-04 03:37:29
Say you have a JMS queue, and multiple consumers are watching the queue for messages. You want one of the consumers to get all of a particular type of message, so you decide to employ message selectors. For example, you define a property to go in your JMS message header named, targetConsumer . Your message selector, which you apply to the consumer known as, A , is something like WHERE targetConsumer = 'CONSUMER_A' . It's clear that consumer A will now just grab messages with the property set like it is in in the example. Will the other consumers have awareness of that, though? IOW, will

Can a Kafka producer create topics and partitions?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 03:10:41
currently I am evaluating different Messaging Systems. There is a question related to Apache Kafka which I could not answer myself. Is it possible for a Kafka producer to create topics and partitions (on existing topics aswell) dynamically? If yes, is there any disadvantage that comes with it? Thanks in Advance Updated: The kafka broker has a property: auto.create.topics.enable If you set that to true if the producer publishes a message to the topic with the new topic name it will automatically create a topic for you. The Confluent Team recommends not doing this because the explosion of topics

Message Groups in RabbitMQ / AMQP

。_饼干妹妹 提交于 2019-12-04 03:07:50
问题 ActiveMQ / JMS has a built in-mechanism for ensuring that messages that share a common header (namely, the JMSXGroupID header) are always consumed by the same consumer of a queue when using a competing consumers pattern. The consumers of a queue are completely agnostic of the actual header values, as the guarantee of messages with a common header is performed server-side and not consumer-side. For more details on how this works, see http://activemq.apache.org/message-groups.html . Is doing

Rules of thumb regarding Messaging / Message Queueing [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-03 21:38:54
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 4 years ago . Can someone provide some rules of thumb regarding when to use Message Queueing and what practical real-world problems they are supposed to address? Thanks Asynchronous messaging allows systems to communicate in a disconnected manner. It is not necessary for both systems to be available simultaneously for work to get done. There are other benefits as well. Often

RabbitMQ using custom headers to store message-parameters

拟墨画扇 提交于 2019-12-03 21:36:09
问题 I'm new to RabbitMQ, and I'm somewhat lost in the documentation. Currently as an example I'm trying to build a small mailer-service that listens to a queue. But I'm somewhat stuck on where I should put the parameters that my service has (destination, subject, ...) Should I put them inside some encoded format (json), inside my messages, or should I use the header-construction, like the following example: string message = "Hello World!"; var body = Encoding.UTF8.GetBytes(message); var