You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by yp...@apache.org on 2022/12/07 14:56:39 UTC

[skywalking-showcase] branch main updated: Fix incorrect acknowledgeMode on consumer side (#107)

This is an automated email from the ASF dual-hosted git repository.

ypg pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-showcase.git


The following commit(s) were added to refs/heads/main by this push:
     new b34bd15  Fix incorrect acknowledgeMode on consumer side (#107)
b34bd15 is described below

commit b34bd15107fa86aedf2780bdf1b13d1bd79e078e
Author: pg.yang <pg...@hotmail.com>
AuthorDate: Wed Dec 7 22:56:34 2022 +0800

    Fix incorrect acknowledgeMode on consumer side (#107)
---
 .../skywalking/showcase/services/song/mq/SongMessageReceiver.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/songs-service/src/main/java/org/apache/skywalking/showcase/services/song/mq/SongMessageReceiver.java b/services/songs-service/src/main/java/org/apache/skywalking/showcase/services/song/mq/SongMessageReceiver.java
index 0a3f7f5..631c044 100644
--- a/services/songs-service/src/main/java/org/apache/skywalking/showcase/services/song/mq/SongMessageReceiver.java
+++ b/services/songs-service/src/main/java/org/apache/skywalking/showcase/services/song/mq/SongMessageReceiver.java
@@ -52,7 +52,7 @@ public class SongMessageReceiver {
             ConnectionFactory factory = new ActiveMQConnectionFactory(activeMQUrl);
             connection = factory.createConnection();
             connection.start();
-            session = connection.createSession(Boolean.TRUE, Session.AUTO_ACKNOWLEDGE);
+            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
             Destination destination = session.createQueue(activeMQQueue);
             messageConsumer = session.createConsumer(destination);
             new Thread(this::receiveMsg).start();