Tag: azureservicebus

我可以在Java SDK 0.9.0中为Azure服务总线连接设置代理吗?

我正在与第三方集成,后者为我们提供了一个Azure服务总线队列来接收消息。 (我们使用https://azure.microsoft.com/en-us/documentation/articles/java-download-azure-sdk/上的下载链接中的0.9.0 Azure jar) 我设置了这样的连接: Configuration config = new Configuration(); config = ServiceBusConfiguration.configureWithConnectionString(null, config, connectionString); ServiceBusContract azureService = ServiceBusService.create(config); 并接收如下消息: ReceiveQueueMessageResult resultQM = azureService.receiveQueueMessage(queueName, receiveMessageOptions); 这在正常情况下工作正常。 但是,在办公室,我必须通过代理,连接失败并出现此错误: com.microsoft.windowsazure.exception.ServiceException: com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection timed out: connect at com.microsoft.windowsazure.services.servicebus.implementation.ServiceBusExceptionProcessor.receiveQueueMessage(ServiceBusExceptionProcessor.java:141) at com.mycompany.dr.theircompany.TheirCompanyDataListener.receiveMessage(TheirCompanyDataListener.java:127) at com.mycompany.dr.theircompany.TheirCompanyDataListener.lambda$0(TheirCompanyDataListener.java:75) at java.lang.Thread.run(Unknown Source) Caused by: com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection timed out: connect at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151) at com.microsoft.windowsazure.services.servicebus.implementation.AuthorizationFilter.handle(AuthorizationFilter.java:39) […]

如何从Qpid JMS(qpid-jms-client-0.11.1.jar)发送/接收来自Azure Service Bus的消息?

我目前正在研究如何使用Qpid JMS(qpid-jms-client-0.11.1.jar)连接到Azure Service Bus。 我创建了一个Demo Java应用程序SimpleSenderReceiver,它使用以下指南( #link1 )连接到已配置的Azure Service Bus。 此代码似乎使用Qpid JMS客户端(版本0.32)的“非常”旧版本。 我现在正试图让它与Qpid JMS的最新稳定版本(qpid-jms-client-0.11.1.jar)一起使用,到目前为止我还没有成功。 通过Qpid JMS 0.11.1的文档#link2 ,您可以看到属性文件中的连接方法与0.32版本中的连接方式不同。 如何在属性文件中设置正确的连接amqp连接字符串 ? 如何设置de Qpid JMS-Azure Service Bus Demo以使用最新的Qpid稳定版本 ? 我一直在运行以下问题: 731 [AmqpProvider:(1):[amqps://example-bus.servicebus.windows.net?transport.connectTimeout=60000]] INFO org.apache.qpid.jms.sasl.SaslMechanismFinder – Best match for SASL auth was: SASL-PLAIN javax.jms.JMSException: Idle timeout value specified in connection OPEN (‘30000 ms’) is not supported. Minimum idle […]

通过Java客户端连接Azure服务总线

我试图从Java客户端连接Azure服务总线与AMQP协议 我按照以下链接中的说明操作: http://azure.microsoft.com/en-us/documentation/articles/service-bus-java-how-to-use-jms-api-amqp/ 1)在Azure门户中创建服务总线,名称空间为“ availo ”,队列名为“ queue1 ” 2)从服务总线连接信息我得到以下内容: SharedAccessKeyName = RootManageSharedAccessKey SharedAccessKey = {}键 3)为JNDI查找创建“servicebus.properties”文件 connectionfactory.SBCF = amqps://RootManageSharedAccessKey:encoded(key)@availo.servicebus.windows.net queue.QUEUE = queue1 4)下面是我的简单java主应用程序,在类路径中包含所有必需的jar(qpid)。 public static void main(String[] args) { try { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, “org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory”); env.put(Context.PROVIDER_URL, “C:\\Users\\Assaf-PC\\Documents\\GitHub\\availo\\rest-api\\src\\main\\resources\\servicebus.properties”); Context context = new InitialContext(env); // Lookup ConnectionFactory and Queue ConnectionFactory cf = (ConnectionFactory) context.lookup(“SBCF”); […]