Skip to content

Commit e96720b

Browse files
authored
Merge pull request #295275 from Saglodha/Emulator-freshchanges
Update event-hubs-emulator-whats-new.md
2 parents 7769d8a + ec9f454 commit e96720b

File tree

5 files changed

+144
-74
lines changed

5 files changed

+144
-74
lines changed

articles/event-hubs/event-hubs-emulator-whats-new.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@ This article provides a detailed overview of the enhancements introduced in the
1919
> Kindly report any problems or suggestions in the emulator's [GitHub installer repository](https://github.com/Azure/azure-event-hubs-emulator-installer/issues).
2020
2121

22-
## Latest version ``2.0.1``
22+
## Latest version ``2.1.0``
2323

24-
> *Released November 19th, 2024*
24+
> *Released March 11th, 2025*
2525
26-
This release introduces Apache Kafka support in Event Hubs emulator.
27-
- The producer and consumer APIs are now compatible with the Event Hubs emulator.
26+
This release introduces health check API in Event Hubs emulator.
27+
- Health check API can be accessed at *http://localhost:5300/health*
2828

2929
## Previous releases
3030

31+
### ``2.0.1`` (November 19th,2024)
32+
33+
This release introduces Apache Kafka support in Event Hubs emulator.
34+
- The producer and consumer APIs are now compatible with the Event Hubs emulator.
35+
3136
### ``1.2.4`` (July 1st,2024)
3237

3338
This release provides enhanced connectivity fixes for Emulator.

articles/event-hubs/test-locally-with-event-hub-emulator.md

Lines changed: 53 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,20 @@ Before you run an automated script, clone the emulator's [GitHub installer repos
3333

3434
### Windows
3535

36-
Use the following steps to run the Event Hubs emulator locally on Windows:
37-
38-
1. Allow the execution of unsigned scripts by running this command in the PowerShell window:
39-
40-
`$>Start-Process powershell -Verb RunAs -ArgumentList 'Set-ExecutionPolicy Bypass –Scope CurrentUser'`
41-
42-
1. Run the setup script *LaunchEmulator.ps1*. Running the script brings up two containers: the Event Hubs emulator and Azurite (a dependency for the emulator).
36+
Use the following steps to run the Event Hubs emulator locally on Windows.
37+
38+
1. **Open PowerShell** and navigate to the directory where the [common](https://github.com/Azure/azure-event-hubs-emulator-installer/tree/main/EventHub-Emulator/Scripts/Common) scripts folder is cloned using `cd`:
39+
```powershell
40+
cd <path to your common scripts folder> # Update this path
41+
42+
2. Issue wsl command to open WSL at this directory.
43+
```powershell
44+
wsl
45+
46+
3. **Run the setup script** *./LaunchEmulator.sh* Running the script brings up two containers: the Event Hubs emulator and Azurite (a dependency for the emulator).
47+
```bash
48+
./Launchemulator.sh
49+
4350
4451
### Linux and macOS
4552
@@ -81,41 +88,45 @@ To run the Event Hubs emulator locally on Linux or macOS:
8188

8289
2. To spin up containers for Event Hubs emulator, Save the following .yaml file as *docker-compose.yaml*.
8390

84-
```
85-
name: microsoft-azure-eventhubs
86-
services:
87-
emulator:
88-
container_name: "eventhubs-emulator"
89-
image: "mcr.microsoft.com/azure-messaging/eventhubs-emulator:latest"
90-
volumes:
91-
- "${CONFIG_PATH}:/Eventhubs_Emulator/ConfigFiles/Config.json"
92-
ports:
93-
- "5672:5672"
94-
- "9092:9092"
95-
environment:
96-
BLOB_SERVER: azurite
97-
METADATA_SERVER: azurite
98-
ACCEPT_EULA: ${ACCEPT_EULA}
99-
depends_on:
100-
- azurite
101-
networks:
102-
eh-emulator:
103-
aliases:
104-
- "eventhubs-emulator"
105-
azurite:
106-
container_name: "azurite"
107-
image: "mcr.microsoft.com/azure-storage/azurite:latest"
108-
ports:
109-
- "10000:10000"
110-
- "10001:10001"
111-
- "10002:10002"
112-
networks:
113-
eh-emulator:
114-
aliases:
115-
- "azurite"
116-
networks:
117-
eh-emulator:
118-
```
91+
```
92+
name: microsoft-azure-eventhubs
93+
services:
94+
emulator:
95+
container_name: "eventhubs-emulator"
96+
image: "mcr.microsoft.com/azure-messaging/eventhubs-emulator:latest"
97+
pull_policy: always
98+
volumes:
99+
- "${CONFIG_PATH}:/Eventhubs_Emulator/ConfigFiles/Config.json"
100+
ports:
101+
- "5672:5672"
102+
- "9092:9092"
103+
- "5300:5300"
104+
environment:
105+
BLOB_SERVER: azurite
106+
METADATA_SERVER: azurite
107+
ACCEPT_EULA: ${ACCEPT_EULA}
108+
depends_on:
109+
- azurite
110+
networks:
111+
eh-emulator:
112+
aliases:
113+
- "eventhubs-emulator"
114+
azurite:
115+
container_name: "azurite"
116+
image: "mcr.microsoft.com/azure-storage/azurite:latest"
117+
pull_policy: always
118+
ports:
119+
- "10000:10000"
120+
- "10001:10001"
121+
- "10002:10002"
122+
networks:
123+
eh-emulator:
124+
aliases:
125+
- "azurite"
126+
networks:
127+
eh-emulator:
128+
129+
```
119130

120131
3. Create an .env file to declare the environment variables for the Event Hubs emulator:
121132

articles/service-bus-messaging/overview-emulator.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,17 @@ Like the Service bus cloud service, the emulator provides the following quotas f
7373
| Number of entities(queues/topics) in a namespace| 50| Yes
7474
| Number of Subscriptions per topic | 50 | Yes
7575
| Number of correlation filters per topic | 1000 | Yes
76+
| Number of SQL Filters | 20 | Yes
77+
| Length of filter condition or rule action string | 1024 | Yes
78+
| Number of expressions per rule action | 32 | Yes
7679
| Number of concurrent connections to namespace| 10 |Yes
7780
| Number of concurrent receive requests on entity (queue/Topic) or subscription entity | 200 |Yes
7881
| Message size | 256 KB |No
7982
| Queue or topic size | 100 MB | No
8083
| Message Time to Live | 1hr | Yes
8184

8285

86+
8387
## Quota configuration changes
8488

8589
By default, the emulator runs with the [config.json](https://github.com/Azure/azure-service-bus-emulator-installer/blob/main/ServiceBus-Emulator/Config/Config.json) configuration file. You can configure the quotas associated with Service bus by editing this file in the following ways, based on your needs:

articles/service-bus-messaging/service-bus-emulator-whats-new.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ This article provides a detailed overview of the enhancements introduced in the
1818
>
1919
> Kindly report any problems or suggestions in the emulator's [GitHub installer repository](https://github.com/Azure/azure-service-bus-emulator-installer/issues).
2020
21+
## Latest version ``1.1.2``
22+
23+
> *Released March 11th, 2025*
24+
25+
This release introduces new features, bug fixes for Service Bus emulator. The details are as follows:
26+
27+
- SQL Actions and Filters are now compatible with Service bus emulator.
28+
- Provides Health check API in Service Bus emulator. It can be accessed at *http://localhost:5300/health*
29+
- Provides user configurable health check interval for SQL.
30+
- Added support for updating LockDuration to a minimum of 5 seconds.
31+
- Other bug fixes.
32+
33+
## Previous releases
2134

2235
### ``1.0.1`` (19th November,2024)
2336

articles/service-bus-messaging/test-locally-with-service-bus-emulator.md

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,17 @@ Before you run an automated script, clone the emulator's [GitHub installer repos
3535

3636
Use the following steps to run the Service Bus emulator locally on Windows:
3737

38-
1. Allow the execution of unsigned scripts by running this command in the PowerShell window:
39-
40-
`$>Start-Process powershell -Verb RunAs -ArgumentList 'Set-ExecutionPolicy Bypass –Scope CurrentUser'`
41-
42-
1. Run the setup script [LaunchEmulator.ps1](https://github.com/Azure/azure-service-bus-emulator-installer/tree/main/ServiceBus-Emulator/Scripts/Windows). Running the script brings up two containers: the Service Bus emulator and Sql Edge (a dependency for the emulator).
38+
1. **Open PowerShell** and navigate to the directory where the [common](https://github.com/Azure/azure-service-bus-emulator-installer/tree/main/ServiceBus-Emulator/Scripts/Common) scripts folder is cloned using `cd`:
39+
```powershell
40+
cd <path to your common scripts folder> # Update this path
41+
42+
2. Issue wsl command to open WSL at this directory.
43+
```powershell
44+
wsl
45+
46+
3. **Run the setup script** *./LaunchEmulator.sh*.Running the script brings up two containers: the Service Bus emulator and Sql Edge (a dependency for the emulator).
47+
```bash
48+
./Launchemulator.sh
4349
4450
### Linux and macOS
4551
@@ -51,9 +57,10 @@ To run the Service Bus emulator locally on Linux or macOS:
5157
5258
1. To start the emulator, supply a configuration for the entities that you want to use. Save the following JSON file locally as _config.json_:
5359
54-
```JSON
60+
61+
```JSON
5562
{
56-
"UserConfig": {
63+
"UserConfig": {
5764
"Namespaces": [
5865
{
5966
"Name": "sbemulatorns",
@@ -67,7 +74,7 @@ To run the Service Bus emulator locally on Linux or macOS:
6774
"ForwardDeadLetteredMessagesTo": "",
6875
"ForwardTo": "",
6976
"LockDuration": "PT1M",
70-
"MaxDeliveryCount": 10,
77+
"MaxDeliveryCount": 3,
7178
"RequiresDuplicateDetection": false,
7279
"RequiresSession": false
7380
}
@@ -89,7 +96,7 @@ To run the Service Bus emulator locally on Linux or macOS:
8996
"DeadLetteringOnMessageExpiration": false,
9097
"DefaultMessageTimeToLive": "PT1H",
9198
"LockDuration": "PT1M",
92-
"MaxDeliveryCount": 10,
99+
"MaxDeliveryCount": 3,
93100
"ForwardDeadLetteredMessagesTo": "",
94101
"ForwardTo": "",
95102
"RequiresSession": false
@@ -100,15 +107,15 @@ To run the Service Bus emulator locally on Linux or macOS:
100107
"Properties": {
101108
"FilterType": "Correlation",
102109
"CorrelationFilter": {
103-
"ContentType": "application/text",
104-
"CorrelationId": "id1",
105-
"Label": "subject1",
106-
"MessageId": "msgid1",
107-
"ReplyTo": "someQueue",
108-
"ReplyToSessionId": "sessionId",
109-
"SessionId": "session1",
110-
"To": "xyz"
111-
}
110+
"ContentType": "application/text",
111+
"CorrelationId": "id1",
112+
"Label": "subject1",
113+
"MessageId": "msgid1",
114+
"ReplyTo": "someQueue",
115+
"ReplyToSessionId": "sessionId",
116+
"SessionId": "session1",
117+
"To": "xyz"
118+
}
112119
}
113120
}
114121
]
@@ -119,7 +126,7 @@ To run the Service Bus emulator locally on Linux or macOS:
119126
"DeadLetteringOnMessageExpiration": false,
120127
"DefaultMessageTimeToLive": "PT1H",
121128
"LockDuration": "PT1M",
122-
"MaxDeliveryCount": 10,
129+
"MaxDeliveryCount": 3,
123130
"ForwardDeadLetteredMessagesTo": "",
124131
"ForwardTo": "",
125132
"RequiresSession": false
@@ -131,7 +138,7 @@ To run the Service Bus emulator locally on Linux or macOS:
131138
"FilterType": "Correlation",
132139
"CorrelationFilter": {
133140
"Properties": {
134-
"prop3": "value3"
141+
"prop1": "value1"
135142
}
136143
}
137144
}
@@ -144,11 +151,37 @@ To run the Service Bus emulator locally on Linux or macOS:
144151
"DeadLetteringOnMessageExpiration": false,
145152
"DefaultMessageTimeToLive": "PT1H",
146153
"LockDuration": "PT1M",
147-
"MaxDeliveryCount": 10,
154+
"MaxDeliveryCount": 3,
148155
"ForwardDeadLetteredMessagesTo": "",
149156
"ForwardTo": "",
150157
"RequiresSession": false
151158
}
159+
},
160+
{
161+
"Name": "subscription.4",
162+
"Properties": {
163+
"DeadLetteringOnMessageExpiration": false,
164+
"DefaultMessageTimeToLive": "PT1H",
165+
"LockDuration": "PT1M",
166+
"MaxDeliveryCount": 3,
167+
"ForwardDeadLetteredMessagesTo": "",
168+
"ForwardTo": "",
169+
"RequiresSession": false
170+
},
171+
"Rules": [
172+
{
173+
"Name": "sql-filter-1",
174+
"Properties": {
175+
"FilterType": "Sql",
176+
"SqlFilter": {
177+
"SqlExpression": "sys.MessageId = '123456' AND userProp1 = 'value1'"
178+
},
179+
"Action" : {
180+
"SqlExpression": "SET sys.To = 'Entity'"
181+
}
182+
}
183+
}
184+
]
152185
}
153186
]
154187
}
@@ -158,10 +191,9 @@ To run the Service Bus emulator locally on Linux or macOS:
158191
"Logging": {
159192
"Type": "File"
160193
}
161-
}
162-
}
163-
164-
```
194+
}
195+
}
196+
```
165197

166198
2.To spin up containers for Service Bus emulator, save the following .yaml file as _docker-compose.yaml_
167199

@@ -174,14 +206,17 @@ services:
174206
emulator:
175207
container_name: "servicebus-emulator"
176208
image: mcr.microsoft.com/azure-messaging/servicebus-emulator:latest
209+
pull_policy: always
177210
volumes:
178211
- "${CONFIG_PATH}:/ServiceBus_Emulator/ConfigFiles/Config.json"
179212
ports:
180213
- "5672:5672"
214+
- "5300:5300"
181215
environment:
182-
SQL_SERVER: sqledge
183-
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
216+
SQL_SERVER: sqledge
217+
MSSQL_SA_PASSWORD: "${SQL_PASSWORD}" # Password should be same as what is set for SQL Edge
184218
ACCEPT_EULA: ${ACCEPT_EULA}
219+
SQL_WAIT_INTERVAL: ${SQL_WAIT_INTERVAL} # Optional: Time in seconds to wait for SQL to be ready (default is 15 seconds)
185220
depends_on:
186221
- sqledge
187222
networks:
@@ -197,9 +232,11 @@ services:
197232
- "sqledge"
198233
environment:
199234
ACCEPT_EULA: ${ACCEPT_EULA}
200-
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
235+
MSSQL_SA_PASSWORD: "${SQL_PASSWORD}" # To be filled by user as per policy : https://learn.microsoft.com/en-us/sql/relational-databases/security/strong-passwords?view=sql-server-linux-ver16
236+
201237
networks:
202238
sb-emulator:
239+
203240
```
204241

205242
3. Create .env file to declare the environment variables for Service Bus emulator and ensure all of the following environment variables are set.

0 commit comments

Comments
 (0)