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] When producing message with Event Hubs async client - partitionId invalid, no available ones #43649

Open
Amir-Qlik opened this issue Dec 29, 2024 · 3 comments
Assignees
Labels
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. Event Hubs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@Amir-Qlik
Copy link

Amir-Qlik commented Dec 29, 2024

Description
In Event Hubs async client, producing a message to a partition with a valid partition Id "0" fails and the exception message lists an empty list of available partition Id's.

Exception
"partitionId is not valid. Available ones:"

To Reproduce

  • Create a buffered producer client builder.
  • Use the builder to create an async client.
  • Create event data.
  • Use the client to enqueue the event, specifying a partition Id in the send options.

Code Snippet

EventHubBufferedProducerClientBuilder builder = new EventHubBufferedProducerClientBuilder()
		.onSendBatchSucceeded(this::onBatchSucceed)
		.onSendBatchFailed(this::onBatchFailed)
		.connectionString(connectionString, hubName);

EventHubBufferedProducerAsyncClient producerClient = builder.buildAsyncClient();
EventData eventData = new EventData(("data_0").getBytes()).setMessageId("id_0");
producerClient.enqueueEvent(eventData, new SendOptions().setPartitionId("0")).subscribe(
		numberOfEvents -> {
			System.out.printf("There are %d events in the buffer.%n", numberOfEvents);
		}, error -> {
			System.err.println("Error occurred enqueueing events: " + error);
		},
		() -> {
			System.out.println("Event successfully enqueued.");
		});

Setup

  • OS: Windows Server 2016
  • IDE: IntelliJ IDEA 2024.1.4
  • SDK: 5.19.2
  • Library/Libraries: com.azure:azure-core:1.54.1
  • Java version: 17
@github-actions github-actions bot added 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. Event Hubs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 29, 2024
Copy link

@anuchandy @conniey @lmolkova

Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@Amir-Qlik
Copy link
Author

Added by mistake as wrong repository, moving to azure-event-hubs-java.

@Amir-Qlik Amir-Qlik reopened this Dec 31, 2024
@Amir-Qlik Amir-Qlik changed the title [BUG] [BUG] When producing message with Event Hubs async client - partitionId invalid, no available ones Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. Event Hubs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team 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

2 participants