Missing support for multiple EventHubs in 1.1.0.RC5 (#508)
See original GitHub issueMissing support for multiple EventHubs in 1.1.0.RC5
I tried to backport to 1.1.0.RC5 the fix that was applied to #508 by excluding the EventHubBinderConfiguration
(via @SpringBootApplication(exclude=EventHubBinderConfiguration.class
) and extending it, to include the following:
@Import({AzureEventHubAutoConfiguration.class, AzureEnvironmentAutoConfiguration.class})
as shown in commit 449a19f.
Here you can find the properties I’ve tried to use to make it so that the consumer bound to “my-eh2-destination” would consume messages coming from a 2nd EventHub (namely, my-namespace2), different than the default my application uses for other bindings (default-namespace).
spring:
cloud:
azure:
eventhub:
enabled: true
namespace: default-namespace
checkpoint-storage-account: my-storage-account
credential-file-path: my.azureauth
resource-group: my-resource-group
region: West US
stream:
default-binder: eventhub
binders:
eventhub2:
type: eventhub
spring:
cloud:
azure:
eventhub:
enabled: true
connection-string: 'my-connection-string-2'
namespace: my-namespace-2
checkpoint-storage-account: my-storage-account
checkpoint-access-key: 'my-access-key'
credential-file-path: my.azureauth
resource-group: my-resource-group
region: West US
environment:
spring:
cloud:
azure:
eventhub:
enabled: true
connection-string: 'my-connection-string-2'
namespace: my-namespace-2
checkpoint-storage-account: my-storage-account
checkpoint-access-key: 'my-access-key'
credential-file-path: my.azureauth
resource-group: my-resource-group
region: West US
bindings:
input:
contentType: application/*+avro
destination: my-eh2-destination
group: $Default
binder: eventhub2
(as you can see I’ve put a lot of extra properties in the mix, but it didn’t help 😃 )
I’ve tested my Spring Boot Application with this setup and, even though the application would successfully terminate the bootstrapping process, it still didn’t seem to connect to the 2nd EventHub at all (the consumer still consumed messages coming from the first EventHub through my-eh2-destination, even though the binding was linked to the binder that was configured for the 2nd EventHub).
Questions
- Is there something else I’m missing to backport #508 into 1.1.0.RC5, that I’m not aware of?
- Is there something I’m doing wrong?
- Is there an expected date for a release that includes the #508 fix?
Your Environment
- Version used: 1.1.0.RC5
- Operating System and version (desktop or mobile): Windows 10 Pro 64-bit
- SDK version: JDK 8u74
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (7 by maintainers)
Top GitHub Comments
Could you publish a snapshot build as I would need this feature desperately… Many thanks, Oliver
Aaah, thanks for that. I added the repo, and now the startup of the App looks promising, connection to two different event hub namespaces was established. I will give feedback after doing some real world tests.