MyServiceBusDocs

Getting started

Publish your first message.

In five short steps, start RabbitMQ, register a consumer, and publish an event. Choose C#, Java, or Kotlin at each step.

A concrete transport for the first run

This walkthrough uses RabbitMQ so every infrastructure step is reproducible. Contracts, consumers, send, publish, request, retry, and fault concepts remain transport-neutral; only setup and transport configuration change for Azure Service Bus.

Native composition for each JVM language

Java uses the MyServiceBus-first decorator style for a managed service graph. Kotlin uses native extensions over the same JVM runtime, removing the decorator and class-literal ceremony. Applications with an existing Spring, CDI, Dagger, Guice, or application-owned environment can still use the bus factory as their integration boundary. See the container and application-factory examples.

  1. 01

    Start RabbitMQ in Docker

    Run the tested RabbitMQ 4.1 broker locally with its management UI.

    Shell
    Loading code…

    The broker listens on localhost:5672. Open the management UI at localhost:15672 and sign in with guest / guest. Stop and remove the container with docker stop myservicebus-rabbitmq.

  2. 02

    Install the RabbitMQ transport

    The transport brings in the core runtime and abstractions.

    .NET CLI
    Loading code…

    Using Maven? Add the same group, artifact, and version as a standard dependency.

  3. 03

    Configure the bus

    Register the consumer and let MyServiceBus create its receive endpoint.

    C#
    Loading code…
  4. 04

    Define messages and a consumer

    A consumer handles one message type through a consume context.

    C#
    Loading code…
  5. 05

    Publish

    Publishing fans the event out to every interested receive endpoint.

    C#
    Loading code…
NextUnderstand the messaging model
Core concepts →