@@ -59,7 +59,7 @@ To run the Service Bus emulator locally on Linux or macOS:
59
59
60
60
```JSON
61
61
{
62
- "UserConfig": {
62
+ "UserConfig": {
63
63
"Namespaces": [
64
64
{
65
65
"Name": "sbemulatorns",
@@ -73,7 +73,7 @@ To run the Service Bus emulator locally on Linux or macOS:
73
73
"ForwardDeadLetteredMessagesTo": "",
74
74
"ForwardTo": "",
75
75
"LockDuration": "PT1M",
76
- "MaxDeliveryCount": 10 ,
76
+ "MaxDeliveryCount": 3 ,
77
77
"RequiresDuplicateDetection": false,
78
78
"RequiresSession": false
79
79
}
@@ -95,7 +95,7 @@ To run the Service Bus emulator locally on Linux or macOS:
95
95
"DeadLetteringOnMessageExpiration": false,
96
96
"DefaultMessageTimeToLive": "PT1H",
97
97
"LockDuration": "PT1M",
98
- "MaxDeliveryCount": 10 ,
98
+ "MaxDeliveryCount": 3 ,
99
99
"ForwardDeadLetteredMessagesTo": "",
100
100
"ForwardTo": "",
101
101
"RequiresSession": false
@@ -106,14 +106,15 @@ To run the Service Bus emulator locally on Linux or macOS:
106
106
"Properties": {
107
107
"FilterType": "Correlation",
108
108
"CorrelationFilter": {
109
- "ContentType": "application/text",
110
- "CorrelationId": "id1",
111
- "Label": "subject1",
112
- "MessageId": "msgid1",
113
- "ReplyTo": "someQueue",
114
- "ReplyToSessionId": "sessionId",
115
- "SessionId": "session1",
116
- "To": "xyz"
109
+ "ContentType": "application/json"
110
+ // Other supported properties
111
+ // "CorrelationId": "id1",
112
+ // "Label": "subject1",
113
+ // "MessageId": "msgid1",
114
+ // "ReplyTo": "someQueue",
115
+ // "ReplyToSessionId": "sessionId",
116
+ // "SessionId": "session1",
117
+ // "To": "xyz"
117
118
}
118
119
}
119
120
}
@@ -125,7 +126,7 @@ To run the Service Bus emulator locally on Linux or macOS:
125
126
"DeadLetteringOnMessageExpiration": false,
126
127
"DefaultMessageTimeToLive": "PT1H",
127
128
"LockDuration": "PT1M",
128
- "MaxDeliveryCount": 10 ,
129
+ "MaxDeliveryCount": 3 ,
129
130
"ForwardDeadLetteredMessagesTo": "",
130
131
"ForwardTo": "",
131
132
"RequiresSession": false
@@ -137,7 +138,7 @@ To run the Service Bus emulator locally on Linux or macOS:
137
138
"FilterType": "Correlation",
138
139
"CorrelationFilter": {
139
140
"Properties": {
140
- "prop3 ": "value3 "
141
+ "prop1 ": "value1 "
141
142
}
142
143
}
143
144
}
@@ -150,11 +151,37 @@ To run the Service Bus emulator locally on Linux or macOS:
150
151
"DeadLetteringOnMessageExpiration": false,
151
152
"DefaultMessageTimeToLive": "PT1H",
152
153
"LockDuration": "PT1M",
153
- "MaxDeliveryCount": 10 ,
154
+ "MaxDeliveryCount": 3 ,
154
155
"ForwardDeadLetteredMessagesTo": "",
155
156
"ForwardTo": "",
156
157
"RequiresSession": false
157
158
}
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
+ ]
158
185
}
159
186
]
160
187
}
@@ -164,8 +191,8 @@ To run the Service Bus emulator locally on Linux or macOS:
164
191
"Logging": {
165
192
"Type": "File"
166
193
}
167
- }
168
- }
194
+ }
195
+ }
169
196
170
197
```
171
198
@@ -180,14 +207,17 @@ services:
180
207
emulator:
181
208
container_name: "servicebus-emulator"
182
209
image: mcr.microsoft.com/azure-messaging/servicebus-emulator:latest
210
+ pull_policy: always
183
211
volumes:
184
212
- "${CONFIG_PATH}:/ServiceBus_Emulator/ConfigFiles/Config.json"
185
213
ports:
186
214
- "5672:5672"
215
+ - "5300:5300"
187
216
environment:
188
- SQL_SERVER: sqledge
189
- MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
217
+ SQL_SERVER: sqledge
218
+ MSSQL_SA_PASSWORD: "${SQL_PASSWORD}" # Password should be same as what is set for SQL Edge
190
219
ACCEPT_EULA: ${ACCEPT_EULA}
220
+ SQL_WAIT_INTERVAL: ${SQL_WAIT_INTERVAL} # Optional: Time in seconds to wait for SQL to be ready (default is 15 seconds)
191
221
depends_on:
192
222
- sqledge
193
223
networks:
@@ -203,9 +233,11 @@ services:
203
233
- "sqledge"
204
234
environment:
205
235
ACCEPT_EULA: ${ACCEPT_EULA}
206
- MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
236
+ 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
237
+
207
238
networks:
208
239
sb-emulator:
240
+
209
241
```
210
242
211
243
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