in Sample-Code-Snippets/Java/Spring-Boot/eventhubs-binder/src/main/java/com/Azure/Testing/EventHubBinder/EventHubBinderApplication.java [81:89]
public void run(String... args) {
LOGGER.info("Going to add message {} to sendMessage.", "Hello World");
try {
Thread.sleep(2000); // Adding a delay of 2 seconds
} catch (InterruptedException e) {
LOGGER.error("Thread interrupted", e);
}
many.emitNext(MessageBuilder.withPayload("Hello World").build(), Sinks.EmitFailureHandler.FAIL_FAST);
}