Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] No iothub-connection-device-id with azure-spring-cloud-stream-binder-eventhubs #22446

Closed
3 tasks done
vbef-finatix opened this issue Jun 22, 2021 · 2 comments
Closed
3 tasks done
Assignees
Labels
azure-spring All azure-spring related issues azure-spring-eventhubs Spring event hubs related issues. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@vbef-finatix
Copy link

vbef-finatix commented Jun 22, 2021

Describe the bug
When consuming Iot Hub messages from the built-in event hub endpoint with the spring-cloud-stream library, the org.springframework.messaging.Message object doesn't contain iothub-connection-device-id in its headers. However, while the EventHubProcessor is processing the message, this value is available.

Code Snippet
My message consumer:

@Bean
fun consume(): Consumer<Message<Any>> {
    return Consumer<Message<Any>> { msg ->
        println(msg)
    }
}

Expected behavior
I want to be able to read the DeviceId in a spring-cloud-stream consumer method

Screenshots
Here you can see that the incoming message in the EventHubProcessor does contain the property iothub-connection-device-id.
EventData
But the EventHubMessageConverter ignores values from systemProperties, so that in the stream cloud consumer assignment to a DeviceId is no longer possible.
Message Consumer

Setup (please complete the following information):

  • OS: Ubunut
  • IDE : IntelliJ
  • Libraries: Spring Boot=2.5.1, com.microsoft.azure.sdk.iot:iot-service-client=1.32.0, com.azure.spring:azure-spring-cloud-stream-binder-eventhubs=2.5.0

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 22, 2021
@chenrujun chenrujun added azure-spring All azure-spring related issues azure-spring-eventhubs Spring event hubs related issues. labels Jun 23, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jun 23, 2021
@yiliuTo
Copy link
Member

yiliuTo commented Jun 25, 2021

@vbef-finatix , thanks for the reporting, we will fix it soon

@yiliuTo yiliuTo added the Client This issue points to a problem in the data-plane of the library. label Jun 25, 2021
@yiliuTo yiliuTo added this to the [2021] August milestone Jun 25, 2021
@yiliuTo
Copy link
Member

yiliuTo commented Aug 5, 2021

Hi @vbef-finatix , this bug has been fixed in pr #22683 , you could update to our latest version of 3.7.0 for the fix.

@yiliuTo yiliuTo closed this as completed Aug 5, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
azure-spring All azure-spring related issues azure-spring-eventhubs Spring event hubs related issues. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants