Skip to content

Commit

Permalink
Update release_validation_linux_macos.md
Browse files Browse the repository at this point in the history
- Add more output to the validation test app
  • Loading branch information
lhotari authored Dec 5, 2024
1 parent 2e8f350 commit a6b9702
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/release_validation_linux_macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,27 @@ using DotPulsar.Extensions;
const string myTopic = "persistent://public/default/mytopic";
// connecting to pulsar://localhost:6650
Console.WriteLine("Connecting to pulsar://localhost:6650");
await using var client = PulsarClient.Builder().Build();
Console.WriteLine("Connected");
Console.WriteLine("Creating consumer");
// consume messages
await using var consumer = client.NewConsumer(Schema.String)
.SubscriptionName("MySubscription")
.Topic(myTopic)
.InitialPosition(SubscriptionInitialPosition.Earliest)
.Create();
Console.WriteLine("Created.");
// produce a message
Console.WriteLine("Creating a producer.");
await using var producer = client.NewProducer(Schema.String).Topic(myTopic).Create();
Console.WriteLine("Sending a message.");
await producer.Send("Hello World");
Console.WriteLine("Sent.");
Console.WriteLine("Waiting for a message.");
var message = consumer.Receive().Result;
Console.WriteLine("Received: " + message.Value());
await consumer.Acknowledge(message);
Expand Down

0 comments on commit a6b9702

Please sign in to comment.