Skip to main content

All Questions

2 votes
0 answers
495 views

Multi-threaded RabbitMQ consumer

I am working on a simple worker micro-service in Java, which is consuming (basicConsume) messages from RMQ, processing them and inserting them into a DB. Currently, the service is using 1 thread for ...
Roy Leibovitz's user avatar
2 votes
1 answer
425 views

Java Message passing among threads

Im new to Java and have been stuck on an issue with respect to thread message passing. What i mean here is- I have 4 threads, one thread reads msg from network and based on type of msg passes on the ...
230490's user avatar
  • 526
0 votes
2 answers
4k views

Kafka: Single consumer group, no partitions and multiple topics

I have 22 topics and ordering within a topic is important to me. I do not have any partitions. Basically I have 11 tenants and I need two topics per tenant. I am confused about whether to have a ...
rohanagarwal's user avatar
0 votes
1 answer
212 views

Java Multiple Producer and Multiple with single queue in Java?

I have three Producers P1,P2,P3 and Three consumers with single shared queue. Producer P1 will put/insert X1,X2,X3 into queue and it should be consumed only by Consumer C1 not other Consumers(C2,C3). ...
kiran kumar Mudradi's user avatar
0 votes
0 answers
121 views

Hazelcast ItemListener stops fetching items

I have used hazelcast cache for distributed queueing and ItemListener for fetching the events from the queue. But printing this message quite a few times, the fetch from queue stops. 2018-06-11 01:...
Prateek's user avatar
  • 342
1 vote
1 answer
773 views

Is it valid to pass netty channels to a queue and use it for writes on a different thread later on?

I have the following setup. There is a message distributor that spreads inbound client messages across a configured number of message queues (LinkedBlockingQueues in my case), based on an unique ...
u6f6o's user avatar
  • 2,190
1 vote
3 answers
163 views

Need inputs about an architecture involving java and a messages queue

I need someone to answer a few questions about how to handle queues in Java. This is a R&D project, I am in the very early phase of my researches, not java developper, sorry for the stupid ...
Flo's user avatar
  • 71
2 votes
2 answers
825 views

ClassCastException when using PriorityBlockingQueue

I'm trying to make a simple message manager for my game. However, I'm getting the following exception: Exception in thread "main" Exception in thread "Thread-4" java.lang.ClassCastException: ...
Ted Gress's user avatar
0 votes
1 answer
79 views

how to concurrently put an element (might exist) without lock in ConcurrentHashMap?

I'm writing a simple message queue program and I have multiple producers and multiple serializer (consumer is not considered right now). The producer specifies which queue it want to send message to ...
Tgn Yang's user avatar
  • 330
0 votes
0 answers
244 views

java NIO MappedByteBuffer is not synchronizing the changes of the content

I'm in a scene that multiple threads of one process A would write to several files concurrently, and then multiple threads of the process B will read from these files and resotre the content after ...
Zihan's user avatar
  • 427
0 votes
1 answer
172 views

Android : Will this be a good pattern for communication between threads in Activity and Fragments?

i am using HandlerThread class for thread communications in an Android App. The main UI thread(Activity) has it own handler,with its handleMessage(Message) overriden to accept message and process it. ...
Abhi Jith's user avatar
7 votes
2 answers
3k views

Consume and publish messages on the same channel

I'm implementing the request/reply pattern in RabbitMQ using Java. I know that channels are not thread-safe, so use 1 channel per consumer/thread. I wonder if there are any problems or inefficienies ...
toandv's user avatar
  • 992
18 votes
1 answer
528 views

Waiting indefinitely for a message that may never arrive

I have a Java typed actor that is responsible for filter/retry logic on an external resource that may be temporarily unavailable. The actor's fields and common methods are: public class MyActorImpl ...
Zim-Zam O'Pootertoot's user avatar
0 votes
1 answer
264 views

Creating an IRC Message Queue

I need a way to limit message count on my IRC bot to avoid a global ban from twitch for chat flooding. (They allow 100 messages/30 seconds) There are two ways I considered doing this both involving a ...
deadfire19's user avatar
0 votes
2 answers
62 views

Handling items in queue when other end fails to receive

I am developing a plugin for a system, the plugin catches some events in that system, wraps them into eatable format and pushes out to another system for analysis. The overhead generated by the plugin ...
Erki M.'s user avatar
  • 5,072

15 30 50 per page