The reactor is very low level, you likely shoudnt use it here. I know
you have been advised already on IRC that something like the JMS
client or vertx-proton might be a better fit for you. However, given
your other thread about JMS and batch messages, its worth nnoting
vertx-proton doesnt currently expose a way for you to do that. I would
echo the advice there from Clemens on using the Azure client in that
case.

That said, some comments inline.

On 22 March 2018 at 22:54, Abhishek Kumar
<mailbox.abhishek.ku...@gmail.com> wrote:
> Hi Team,
>
> I need to connect Azure service Bus for sending messages. I followed given
> example and changed only host name to
> amqps://XXX:x...@abcd.servicebus.windows.net/queueName
>

The example expects a hostname and not a URI like above, i.e it doesnt
expect schemes / credentials / queue names, so I expect thats why you
are seeing issues.

> While running the Send class, i am getting below error. I tried a lot but
> could not solve the issue.
>
> Please find attached Example. I think, i need to create SASL connection for
> connecting to Azure Service Bus using host, port, username and password. I
> did not found any sample code to create SASL connection.
>
> It will be highly appreciated if you can provide any sudo code to connect
> Azure Service Bus using  host, port, username and password ?
>

The reactor defaults to doing ANONYMOUS. To configure sasl otherwise,
you need to call sasl() on the Transport object in an
onConnectionBound handler.

There is an example in
https://issues.apache.org/jira/browse/PROTON-1718?focusedCommentId=16316780&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16316780
of doing a completely custom SASL mechanism that shows this and more.
Youd probably just need a simpler thing such as PLAIN, and theres is a
helper method on the Sasl object to do that and set the credentials,
so you could skip the more elaborate listener bits.

You would also need to configure SSL using the ssl() method.

>
> Error
>
> Exception in thread "main" org.apache.qpid.proton.engine.HandlerException:
> java.lang.IllegalStateException: No address provided for Connection at
> org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112) at
> org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
> at
> org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:292)
> at org.apache.qpid.proton.reactor.impl.ReactorImpl.run(ReactorImpl.java:357)
> at org.apache.qpid.proton.example.reactor.Send.main(Send.java:151) Caused
> by: java.lang.IllegalStateException: No address provided for Connection at
> org.apache.qpid.proton.reactor.impl.IOHandler.handleBound(IOHandler.java:155)
> at
> org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:380)
> at
> org.apache.qpid.proton.engine.BaseHandler.onConnectionBound(BaseHandler.java:58)
> at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:131) at
> org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
> ... 4 more
>
>
>
> Regards,
> Abhishek Kumar
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to