@Bean @Scope("prototype") @ConditionalOnMissingBean @ConditionalOnProperty(prefix = "azure.servicebus", value = "topic-name") public TopicClient topicClient() throws InterruptedException, ServiceBusException { return new TopicClient(new ConnectionStringBuilder(properties.getConnectionString(), properties.getTopicName())); }
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix = "azure.servicebus", value = "topic-name") public TopicClient topicClient() throws InterruptedException, ServiceBusException { return new TopicClient(new ConnectionStringBuilder(properties.getConnectionString(), properties.getTopicName())); }
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix = "azure.servicebus", value = "topic-name") public TopicClient topicClient() throws InterruptedException, ServiceBusException { trackCustomEvent(); return new TopicClient(new ConnectionStringBuilder(properties.getConnectionString(), properties.getTopicName())); }
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix = "azure.servicebus", value = "topic-name") public TopicClient topicClient() throws InterruptedException, ServiceBusException { trackCustomEvent(); return new TopicClient(new ConnectionStringBuilder(properties.getConnectionString(), properties.getTopicName())); }
private IMessageSender createTopicClient(String topicName) { if (resourceManagerProvider != null && StringUtils.hasText(namespace)) { ServiceBusNamespace serviceBusNamespace = resourceManagerProvider.getServiceBusNamespaceManager().getOrCreate(namespace); resourceManagerProvider.getServiceBusTopicManager().getOrCreate(Tuple.of(serviceBusNamespace, topicName)); } try { return new TopicClient(new ConnectionStringBuilder(connectionString, topicName)); } catch (InterruptedException | ServiceBusException e) { throw new ServiceBusRuntimeException("Failed to create service bus topic client", e); } }
private IMessageSender createTopicClient(String topicName) { if (resourceManagerProvider != null && StringUtils.hasText(namespace)) { ServiceBusNamespace serviceBusNamespace = resourceManagerProvider.getServiceBusNamespaceManager().getOrCreate(namespace); resourceManagerProvider.getServiceBusTopicManager().getOrCreate(Tuple.of(serviceBusNamespace, topicName)); } try { return new TopicClient(new ConnectionStringBuilder(connectionString, topicName)); } catch (InterruptedException | ServiceBusException e) { throw new ServiceBusRuntimeException("Failed to create service bus topic client", e); } }