Initial Release
This repository is a small, focused example that shows how to connect InterSystems IRIS interoperability productions to Azure Service Bus queues by using embedded Python.
It is intended for customers who want to understand:
The current implementation is deliberately compact. It favors clarity over completeness so the integration pattern is easy to inspect and reuse.
The demo production contains two main integration paths:
IRIS message -> Demo.Azure.ServiceBus.Outbound.BusinessOperation -> Azure Service Bus queue
The outbound Business Operation:
OnInit()Azure Service Bus queue -> Demo.Azure.ServiceBus.Inbound.Adapter -> Demo.Azure.ServiceBus.Inbound.BusinessService
The inbound adapter:
PEEK_LOCKThe inbound Business Service currently keeps the logic simple:
iris/src/Demo/Production.cls
iris/src/Demo/Azure/ServiceBus/Outbound/BusinessOperation.cls
iris/src/Demo/Azure/ServiceBus/Outbound/Request.cls
iris/src/Demo/Azure/ServiceBus/Outbound/Response.cls
iris/src/Demo/Azure/ServiceBus/Inbound/Adapter.cls
iris/src/Demo/Azure/ServiceBus/Inbound/BusinessService.cls
iris/src/Demo/Azure/ServiceBus/Inbound/Request.cls
docs/service-principal-passwordless.md
Main points:
Demo.Production is the top-level IRIS productionOutbound/* contains the send-to-Service-Bus flowInbound/* contains the receive-from-Service-Bus flowdocs/service-principal-passwordless.md captures a future passwordless setup using a service principalBefore starting, make sure you have:
The container installs the required Python package for embedded Python:
azure-servicebusClone the repository and start the IRIS container:
git clone
cd iris-azure-interop
docker compose build
docker compose up -d
Once the container is running:
http://localhost:52776/csp/sys/UtilHome.cspsuperuserSYSThe source code is loaded during image build from:
iris/srcIf you do not already have a queue, start with Microsoft’s quickstart:
For the current version of this repo, the simplest way to test is:
Important:
QueueName is only the queue name, for example myqueueIn the Management Portal:
Demo.ProductionYou should see at least these components:
Azure ServiceBus SenderAzure ServiceBus ReceiverThe production is intentionally small so it is easy to explore.
Open the component:
Azure ServiceBus SenderThis component is backed by:
Demo.Azure.ServiceBus.Outbound.BusinessOperationConfigure:
ConnectionStringQueueNameWhat this component does:
Body to the Azure queueMessageIdCorrelationIdSubjectApplicationPropertiesJSONFocus on:
OnInit()OnMessage()PySendMessage()Use the component test tool in the production to send an instance of:
Demo.Azure.ServiceBus.Outbound.RequestSuggested values:
Body: a JSON string such as {"hello":"from iris"}MessageId: a unique stringSubject: something like demoThen check the queue in Azure Portal using Service Bus Explorer.
Open the component:
Azure ServiceBus ReceiverThis receiver is backed by:
Demo.Azure.ServiceBus.Inbound.BusinessServiceDemo.Azure.ServiceBus.Inbound.AdapterConfigure on the receiver:
ConnectionStringQueueNameMaxMessageCountMaxWaitTimePEEK_LOCKMaxMessageCount messages in one cycleDemo.Azure.ServiceBus.Inbound.RequestThis keeps the example reliable while still showing a more realistic batched adapter design.
Focus on:
OnTask()PyReceiveBatch()PyCompleteMessageByToken()PyAbandonMessageByToken()InterSystems IRIS requires interoperability callback methods such as:
OnInit()OnTearDown()OnMessage()OnTask()to remain in ObjectScript.
The Azure SDK logic is therefore placed in helper methods marked:
[ Language = python ]This repo shows that pattern directly in both inbound and outbound components.
The current example uses a Service Bus connection string in the production settings because it is the fastest way to get a first working demo.
A better production-ready direction is to avoid exposing the full connection string directly in the production.
Two common options are:
DefaultAzureCredentialFor the passwordless service principal option, see: