Search code examples
vert.xsolacesolace-mqvertx-verticle

Vertx Java Client throwing "SMF AD bind response error" while connecting solace vmr Server


When I am trying to connect solace VMR Server and deliver the messages from a Java client called Vertx AMQP Bridge.

I am able to connect the Solace VMR Server but after connecting, not able to send messages to solace VMR. I am using below sender code from vertx client.

public class Sender extends AbstractVerticle {

    private int count = 1;

    // Convenience method so you can run it in your IDE
    public static void main(String[] args) {
        Runner.runExample(Sender.class);
    }

    @Override
    public void start() throws Exception {
    AmqpBridge bridge = AmqpBridge.create(vertx);

    // Start the bridge, then use the event loop thread to process things thereafter.
    bridge.start("13.229.207.85", 21196,"UserName" ,"Password", res -> {
        if(!res.succeeded()) {
            System.out.println("Bridge startup failed: " + res.cause());
            return;
        }

        // Set up a producer using the bridge, send a message with it.
        MessageProducer<JsonObject> producer = 
            bridge.createProducer("T/GettingStarted/pubsub");

        // Schedule sending of a message every second
        System.out.println("Producer created, scheduling sends.");
        vertx.setPeriodic(1000, v -> {
            JsonObject amqpMsgPayload = new JsonObject();

            amqpMsgPayload.put(AmqpConstants.BODY, "myStringContent" + count);
            producer.send(amqpMsgPayload);

            System.out.println("Sent message: " + count++);
        });
    });
}

}

I am getting the error below:

Bridge startup failed: io.vertx.core.impl.NoStackTraceThrowable: Error{condition=amqp:not-found, description='SMF AD bind response error', info={solace.response_code=503, solace.response_text=Unknown Queue}} Apr 27, 2018 3:07:29 PM io.vertx.proton.impl.ProtonSessionImpl WARNING: Receiver closed with error io.vertx.core.impl.NoStackTraceThrowable: Error{condition=amqp:not-found, description='SMF AD bind response error', info={solace.response_code=503, solace.response_text=Unknown Queue}}

I have created queue and also topic correctly in solace VMR but not able to send/receive messages. Am I missing any configuration from solace VMR Server side? Is there any code-change required in the Vertx Sender Java code above? I am getting the error trace above when delivering message. Can someone help on the same?

Vertx AMQP Bridge Java client :https://vertx.io/docs/vertx-amqp-bridge/java/


Solution

  • There are a few different reason why you may be encountering this error.

    It could be that the client is not authorized to publish guaranteed messages. To fix this, you need to enable "guaranteed endpoint create" in the client-profile on the Solace router side.

    It may also be that the application is using Reply Handling. This is not currently supported with the Solace router. Support for this will be added in the 8.11 release of the Solace VMR. A workaround for this would be to set ReplyHandlingSupport to false.

    AmqpBridgeOptions().setReplyHandlingSupport(false);
    

    There is also a known issue in the Solace VMR which causes this error when unsubscribing from a durable topic endpoint. A fix for this issue will also be in the 8.11 release of the Solace VMR. A workaround for this is to disconnect the client without first unsubscribing.