We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting with version 3.2 the order of message delivery breaks.
Here's the test code:
public class TopicsTest { private static final String TOPIC = "test"; private static final String REQUESTS_PROCESSOR = "requestsProcessor"; private static final int MESSAGES_NUMBER = 30; public static void main(String[] args) { Hazelcast.newHazelcastInstance(); HazelcastInstance client = HazelcastClient.newHazelcastClient(); ITopic<Integer> topic = client.getTopic(TOPIC); topic.addMessageListener(new IntegerMessageListener()); IExecutorService executorService = client.getExecutorService(REQUESTS_PROCESSOR); executorService.submit(new SendingCallable()); } static class IntegerMessageListener implements MessageListener<Integer> { boolean broken = false; int expected = 1; List<Integer> received = new ArrayList<>(); @Override public synchronized void onMessage(Message<Integer> message) { Integer messageObject = message.getMessageObject(); received.add(messageObject); if (!broken && expected != messageObject){ System.out.println("Order breaks at " + expected); broken = true; } expected++; if (received.size() == MESSAGES_NUMBER){ System.out.println("Result: " + received); } } } static class SendingCallable implements Callable<Void>, HazelcastInstanceAware, Serializable { private HazelcastInstance hazelcastInstance; @Override public Void call() throws Exception { ITopic<Object> topic = hazelcastInstance.getTopic(TOPIC); for (int i = 1; i <= MESSAGES_NUMBER; i++) { topic.publish(i); } return null; } @Override public void setHazelcastInstance(HazelcastInstance hazelcastInstance) { this.hazelcastInstance = hazelcastInstance; } } }
Everything's fine with the version 3.1.7, but since 3.2 it doesn't work.
Same with order of notification of map's EntryListener and collection's ItemListener
The text was updated successfully, but these errors were encountered:
Thanks for this bug report and the test to reproduce it. Reproducing an issue often is a big time consumer.
Sorry, something went wrong.
related to #2607 Order is broken with same reason. You can follow other issue, closing this one. Thanks for test.
Improve default config file and docs on config options (#2513)
d95c939
sancar
No branches or pull requests
Starting with version 3.2 the order of message delivery breaks.
Here's the test code:
Everything's fine with the version 3.1.7, but since 3.2 it doesn't work.
Same with order of notification of map's EntryListener and collection's ItemListener
The text was updated successfully, but these errors were encountered: