如何在创建 API 时调试 invlide JMS URL [英] How to debug invlide JMS URL while creating an API

查看:16
本文介绍了如何在创建 API 时调试 invlide JMS URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照示例执行以下操作:使用 JMS 后端端点创建 API – 现在让我们在 API 管理器中创建 API.您可以在创建 API 时遵循常规流程.如下所示,请确保在定义资源时启用 'POST' HTTP 动词.

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.

完成此操作后,让我们添加 JMS URL 作为生产端点.从端点类型下拉菜单中选择端点类型为地址端点".生产 URL 将是实际的 JMS 端点.ActiveMQ 消息队列的 JMS URL 应该是这样的:

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=队列

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

在本例中,队列名称为‘DataFeed’,队列 URL 为 localhost,端口号为 61616."

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

当我使用测试"按钮验证 URL 时.我得到无效"但不确定什么是无效的.我在 activeMQ 中创建了 DataFeed 队列,并通过在 activeMQ 中使用默认值假设其他变量是标准的.知道如何获得更有意义的信息吗?

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?

推荐答案

AFIK 这是当前行为,URL 测试仅适用于 http/https 端点和其他传输(如 jms、RabbitMQ)似乎此选项不正确工作.

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.

即使测试选项给出无效"消息,您也可以通过使用 API 发送消息来检查 URL 功能,然后检查消息是否正确入队.

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.

这篇关于如何在创建 API 时调试 invlide JMS URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆