Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2090#discussion_r188530577 --- Diff: artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java --- @@ -308,6 +312,8 @@ public int sendMessage(MessageReference reference, ServerConsumer consumer, int deliveryCount) { AMQConsumer theConsumer = (AMQConsumer) consumer.getProtocolData(); + //clear up possible rolledback ids. + rollbackedIds.remove(message.getMessageID()); --- End diff -- That's in the hot path of any send operation and `rollbackIds` would be contended by all the producers/consumers using the same AMQSession and it create a Long instance on any call of it. There are other ways to implement it?
---