Open 1-javier-fernandez opened 9 months ago
You may tag me by also using @jfggdl (I am the Event Grid Product Manager).
I have added a comparison report that shows the dependencies of a simple project that depends only on the messaging.eventgrid jar, which it works as expected, vs my project's dependencies. There are minor version changes between the two set of dependencies where they have common jars.
@saragluna FYI - I will take a first look but if you see something that jumps out please speak up! :)
@billwert - Just sharing some thoughts. One possibility is, the call site of publishCloudEventSync()
happens to run on Netty-IO thread. For example, if call site is a callback that Netty-Server calls upon the arrival HTTP request (mapped to some REST Path).
If the SDK sync API (sync over async) underneath blocks the current thread and given the current thread is IO Thread, setup may emit this error.
If that’s the case, I wonder in general if Spring has some way / annotation to set a block-able worker Thread to run the publishCloudEventSync() or configure that Netty callback runs on block-able worker Thread. @saragluna
@1-javier-fernandez I am wondering how is the publishCloudEventSync()
method called in your project? Do you have the codesnippet for that?
@saragluna It is exactly the code pasted on the top when I created the issue. Thanks for looking into this.
Hi @jfggdl, but the publishCloudEventSync
needs to be called, maybe by a controller?
@saragluna, Correct. It is a simple call to the publishCloudEventSync() from a controller method using jar 4.17.0-beta.1.
@saragluna do we have an ETA as to when this issue should be mitigated? Thanks. This is Javier from Event Grid, by the way. You may want to ping me in Teams to get my attention immediately.
Describe the bug The following root cause exception is thrown when attempting to publish an event using Event Grid's synchronous EventGridClient.publishCloudEvent in a SpringBoot 2.7.3 application:
Note: the same code works as expected using a project with just the azure-messaging-eventgrid and azure-core dependencies.
Exception or Stack Trace
Stack trace is too long. I have attached it.
To Reproduce
Create a Spring Boot application version 2.7.3 that uses Event Grid's 4.17.0-beta.1 jar. Then use code like in the coming section.
Code Snippet
Expected behavior The code should send 1 event to the namespace topic configured. You should be able to see on the namespace's metrics (Azure portal and on the namespace overview page) that event(s) have been published successfully.
Screenshots N/A
Setup (please complete the following information):
Additional context
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