message-queue

How to pause a Thread's Message Queue in Android?

ⅰ亾dé卋堺 提交于 2019-12-09 07:21:24
I am queuing up a bunch of runnables into a thread via a Handler.post(). I would like the ability to send a note to that thread that it should pause. By pause I mean, finish the runnable or message you are currently working on, but don't go to the next message or runnable in your message queue until I tell you to continue. In case anyone else finds their way to this question, I ended up going with a ThreadPoolExecutor, using the example code in it's documentation for creating a PausableThreadPoolExecutor: http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadPoolExecutor

Error “unknown delivery tag” occurs when i try ack messages to RabbitMQ using pika (python)

こ雲淡風輕ζ 提交于 2019-12-09 05:05:31
问题 I want process messages in few threads but i'm getting error during execute this code: from __future__ import with_statement import pika import sys from pika.adapters.blocking_connection import BlockingConnection from pika import connection, credentials import time import threading import random from pika.adapters.select_connection import SelectConnection from pika.connection import Connection import traceback def doWork(body, args, channel): r = random.random() time.sleep(r * 10) try:

Awful MSMQ Performance Using ReceiveById

安稳与你 提交于 2019-12-08 17:05:49
问题 Just 20 message per second! That is all I got! Here is the code that peeks 50 message from queue and receives them in parallel using ReceiveById. Total number of messages in queue is 500. I have tested other numbers too. But the top limit is 20 message per second! Am I somewhere totally out of the way? Edit 1: 1 - I need the queue to be recoverable. BUT the interesting part is even if I set the recoverable option to false; still the top limit is 20 message/sec. 2 - I am forced to use MSMQ

Publish/Subscribe vs Producer/Consumer?

爱⌒轻易说出口 提交于 2019-12-08 16:01:00
问题 From messaging point of view with systems like kafka, rabbit, hornet mq, activemq etc... Is there a difference between pub/sub and prod/con or are they used interchangeably? 回答1: Although both Publish/Subscribe and Producer/Consumer terms are related to messaging, they are different and can't be used interchangeably. Publish/Subscribe is a messaging pattern where a publication is distributed to multiple receivers. A Producer is the sender of messages and consumer is the receiver of messages.

Receiving the Same MSMQ Message Twice?

删除回忆录丶 提交于 2019-12-08 13:37:31
问题 I have an MSMQ-based system with three layers that communicate with each other. For the sake of simplicity, I'll refer to them as Layer 1, 2, and 3. They sit like this: Layer 1 <-> Layer 2 <-> Layer 3 So Layer 1 talks only to Layer 2, Layer 3 talks only to Layer 2, and Layer 2 talks to both others. I have four queues for this, Layer1_in Layer1_out Layer3_out Layer3_in And the layers communicate over this infrastructure: Layer 1 -> Layer1_out -> Layer 2 Layer 1 <- Layer1_in <- Layer 2 Layer 3

Microservice Architecture dependency

六月ゝ 毕业季﹏ 提交于 2019-12-08 11:15:34
I have read a lot about microservice architecture but there is one thing that I dont understand how to achieve and hope you can help me with this... Lets say I have a web-api-endpoint that recieves orders that an OrderMicroservice is responsible to handle. When order is put Inventory must be updated so OrderMS publish an event to subscribers (pub/sub using for example Nats) and InventoryMS will update the inventory due to it is subscribing to current event/message....I want to have a loose coupled architecture and use asynch calls to modules/MSs thats are interested in given info. Given

How should I read multiple queues, pro rata by user and priority?

限于喜欢 提交于 2019-12-08 10:42:48
问题 I am currently trying to think of ways to replace a MySQL + Cron queuing system with a message queue system (AWS SQS/Beanstalkd/Iron MQ/Redis). Let's say I have 100 users. These users are able to make API requests to me. Each API request is an SMS which I must send via a single modem which I operate. Each SMS can have a priority of 1-3. The problem that I am facing, is that the single modem is a bottleneck, so I can't simply process the queue in a FIFO order, because if one user sends 10,000

Microservice Architecture dependency

空扰寡人 提交于 2019-12-08 08:15:28
问题 I have read a lot about microservice architecture but there is one thing that I dont understand how to achieve and hope you can help me with this... Lets say I have a web-api-endpoint that recieves orders that an OrderMicroservice is responsible to handle. When order is put Inventory must be updated so OrderMS publish an event to subscribers (pub/sub using for example Nats) and InventoryMS will update the inventory due to it is subscribing to current event/message....I want to have a loose

Architecture of a web application using message queues

女生的网名这么多〃 提交于 2019-12-08 07:30:50
问题 I have a java web application which uses some form of custom message queuing via a database table (EmailQueue) to queue delivery of emails. The application is deployed on Tomcat and uses Quartz jobs which polls for new entries in the EmailQueue table to send. I now need to add queuing of a few other types of jobs and messages (notifications, sms, etc.) and am therefore looking into using a proper message queue (RabbitMQ, ActiveMQ, etc.) instead of the database. This is motivated by a few

On Windows - where is a mqji.properties for me to use?

≯℡__Kan透↙ 提交于 2019-12-08 07:02:44
问题 My application is a stand alone Java app, that customers download, install and run. It uses MQ to communicate with a host, which has been working for years. Neither myself nor customers have anything MQ installed on their Windows machines; we include and use com.ibm.mq.jar to do the work. Apparently though, MQ needs a mqji.properties file in the classpath to prevent this : Unable to load message catalog - mqji com.ibm.mq.MQException: Message catalog not found So my question is : Where do I