Skip to content

Add support for ASB emulator#26

Open
martivj wants to merge 2 commits intophilipmat:mainfrom
martivj:main
Open

Add support for ASB emulator#26
martivj wants to merge 2 commits intophilipmat:mainfrom
martivj:main

Conversation

@martivj
Copy link

@martivj martivj commented Feb 16, 2026

Description

The current state of the PurpleExplorer project seems to primarily target real service bus instances, as shown with your-service-bus.servicebus.windows.net in the appstate.json preset. However, this tool can also be very useful for local development with access to the dockerized ASB emulator setup recommended by Microsoft.

Current Problem

The Azure Service Bus emulator uses two separate ports for different types of operations:

  • Port 5672: AMQP messaging operations (sending/receiving messages)
  • Port 5300: Management/administration operations (listing topics, queues, subscriptions, etc.)

This differs from production Azure Service Bus, which handles both operation types through the same endpoint.

So if you try to connect to the emulator locally with the current state of PurpleExplorer, it will detect the topic and queues well, but trying to view what is on a queue triggers an infinite loading screen.

Proposed Fix

This PR resolves this problem with some added flexibility in the BaseHelper.cs class, where it now:

  1. Detects emulator mode by checking for UseDevelopmentEmulator=true in the connection string
  2. Routes operations to the correct port:
  • GetManagementConnectionString() → ensures port 5300 for ServiceBusAdministrationClient (used for browsing queues, topics, subscriptions)
  • GetMessagingConnectionString() → ensures port 5672 for ServiceBusClient (used for message send/receive operations)
  1. Modifies the endpoint dynamically using the EnsurePort() method, which parses the connection string and rebuilds it with the appropriate port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant