demonstrateSimpleMessaging function

Future<void> demonstrateSimpleMessaging(
  1. StompClient client
)

Implementation

Future<void> demonstrateSimpleMessaging(StompClient client) async {
  print('\n📨 Example 1: Simple Message Sending');

  // Send a simple message to a destination
  final receiptId = await client.send(
    destination: '/queue/example',
    body: 'Hello, STOMP World!',
    contentType: 'text/plain',
    requestReceipt: true,
  );

  print('✅ Message sent with receipt ID: $receiptId');
}