How to debug invlide JMS URL while creating an API

坚强是说给别人听的谎言 提交于 2019-12-11 16:16:53

问题


I am following an example to do the following: "Create an API with the JMS backend endpoint – Let’s now create an API within the API manager. You can follow the regular process when creating the API. As shown below, make sure you enable ‘POST’ HTTP verb when defining the resources.

Once this has been done, let’s add the JMS URL as the production endpoint. Select the endpoint type as ‘Address Endpoint’ from the endpoint type drop-down menu. The production URL would be the actual JMS endpoint. The JMS URL for an ActiveMQ message queue should something like this:

jms:/DataFeed?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue

In this case, the queue name is ‘DataFeed’, and Queue URL is localhost with port number 61616."

When I use the "Test" button to verify the URL. I get "invalid" but not sure what's not valid. I have DataFeed queue created in activeMQ and assume other variables are standard by using default values in activeMQ. Any idea how to get more meaningful message?


回答1:


AFIK this is the current behavior, URL tests only available for the http/https endpoints and for the other transport (like jms,RabbitMQ) seems this option not correctly work.

Even though, test option giving the "invalid" message you can check the URL functionality by sending a message using the API, then check whether the message correctly enqueue.



来源:https://stackoverflow.com/questions/34957558/how-to-debug-invlide-jms-url-while-creating-an-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!