Skip to content

Commit 0666c51

Browse files
Fix confusing error message from MessageReplay.js on failed binding to a queue
1 parent 316ab86 commit 0666c51

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/features/MessageReplay/MessageReplay.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,20 @@ var QueueConsumer = function (queueName) {
158158
consumer.messageConsumer = consumer.session.createMessageConsumer({
159159
// solace.MessageConsumerProperties
160160
queueDescriptor: { name: consumer.queueName, type: solace.QueueType.QUEUE },
161-
acknowledgeMode: solace.MessageConsumerAcknowledgeMode.CLIENT, // Enabling Client ack
162-
replayStartLocation: consumer.replayStartLocation,
161+
acknowledgeMode: solace.MessageConsumerAcknowledgeMode.CLIENT,
162+
replayStartLocation: consumer.replayStartLocation
163163
});
164164
// Define message consumer event listeners
165165
consumer.messageConsumer.on(solace.MessageConsumerEventName.UP, function () {
166166
consumer.consuming = true;
167167
});
168-
consumer.messageConsumer.on(solace.MessageConsumerEventName.CONNECT_FAILED_ERROR, function () {
168+
consumer.messageConsumer.on(solace.MessageConsumerEventName.CONNECT_FAILED_ERROR, function (error) {
169169
consumer.consuming = false;
170-
consumer.log('=== Error: the message consumer could not bind to queue "' + consumer.queueName +
171-
'" ===\n Ensure this queue exists on the message router vpn');
170+
consumer.log('\n=== Error: the message consumer could not bind to queue "' + consumer.queueName +
171+
"' ===\nError message: " + error.message +
172+
"\nEnsure that:" +
173+
"\n - The queue exists on the message router vpn" +
174+
"\n - You have created the replay log.");
172175
});
173176
consumer.messageConsumer.on(solace.MessageConsumerEventName.DOWN, function () {
174177
consumer.consuming = false;

0 commit comments

Comments
 (0)