Skip to main content
0 votes
1 answer
53 views

Found that KafkaConsumer is quite inconvenient for testing, tried to implement it myself based on LinkedBlockingQueue. Using Spring Boot, Java 21, Guava and Kafka Testcontainers 7.8.2. Here is what it ...
catch32's user avatar
  • 18.8k
1 vote
1 answer
222 views

From the docs I see, that the take() method blocks until an element becomes available. Is there any other scenario when it could block? What I mean is, is there a possible scenario, when the queue is ...
Kristóf Marosvári's user avatar
0 votes
0 answers
46 views

I am using LinkedBlockingQueue in my application. When the application is running the program waits at blockingqueue.take() statement. Even though after adding some objects into the queue, it is not ...
Visweswararao Atluri's user avatar
0 votes
0 answers
56 views

I have a situation with a lot of callbacks, specifically onCompleteListeners from Firebase Auth. First I am getting a Firebase Auth object using an SDK. However there is no other option but to use ...
user1743524's user avatar
0 votes
1 answer
169 views

I want to build a GraphQl-like subscription where a client via websocket can ask the Akka Http server to subscribe to updated results from a database and push them back via websocket to the client. My ...
Marc Grue's user avatar
  • 5,375
0 votes
1 answer
583 views

I am trying to poll an ArrayBlockingQueue to get the item: public void run() { while (true) { if (Thread.currentThread().isInterrupted()){ closeAppender(); ...
pebble unit's user avatar
  • 1,431
0 votes
0 answers
344 views

Does anybody know if there is existing Java data structure where elements are automatically removed from it based on the delay for each element? In other words, each element has its own ttl. For ...
user25963's user avatar
0 votes
0 answers
80 views

I'm trying to remove elements manually from ArrayBlockingQueue by using the removeIf() method, using threads. And then have another thread trying to put an element into the ArrayBlockingQueue. It ...
Jia Wen Chin's user avatar
0 votes
1 answer
98 views

I'd like to work with the following data structure: List<BlockingQueue<AtomicInteger>> listOfQueues = Collections.synchronizedList( new ArrayList<ArrayBlockingQueue<...
curiousMind_85's user avatar
1 vote
2 answers
87 views

It comes to a surprise to me when I am trying to implement some compound actions with a BlockingQueue based producer/consumer pattern, which makes me think I most likely have missed something obvious. ...
coder joe's user avatar
0 votes
1 answer
242 views

I am making an online game in Java and I ran into one particular issue where I was trying to find the most efficient way to send clients spawn entity NPC packets. I of course understand how to send ...
IDontWantToMakeAnotherAccount's user avatar
0 votes
1 answer
388 views

I'm trying to create an Executor Service using a DelayQueue for the blocking queue with Java 8. I created a class that implements Runnable and Delayed, and implemented the required methods: public ...
user6604739's user avatar
0 votes
1 answer
306 views

I'm having a trouble with my code design and can't find a solution. I am implementing a BlockingQueue using Semaphores (TaggedSemaphores, to be precise) without loops, condvars, mutexes, and if-else ...
Amir Mokhammed-Ali's user avatar
0 votes
0 answers
35 views

In my Main Class I'm calling the Runnable Class Browser multiple times with an URL using blockingQueue.offer(..), which is linked to my ThreadPoolExecutor pool = new ThreadPoolExecutor(...
Max's user avatar
  • 7
0 votes
1 answer
73 views

I'm using multi threading with Java, I have a thread that will post a message into a queue, a blockingQueue which is thread safe, and I have another thread, implementing a GUI with swing. Everytime I'...
WHXY's user avatar
  • 23

15 30 50 per page
1
2 3 4 5
31