https://github.com/harshanalluru/issue-8875
https://github.com/harshanalluru/issue-8875
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/harshanalluru/issue-8875
- Owner: HarshaNalluru
- Created: 2020-10-05T19:04:20.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-07T20:17:13.000Z (almost 5 years ago)
- Last Synced: 2025-02-09T22:25:12.786Z (9 months ago)
- Language: TypeScript
- Size: 3.21 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Setup
1. Install node
2. Clone the repo
3. Run `npm install` to get the dependencies
4. Create a `.env` file and enter connection string
```
SERVICEBUS_CONNECTION_STRING=
```
5. Install typescript and ts-node
```bash
npm install -g typescript
npm install -g ts-node
```
### Running the sample
1. Create queues in your namespace with and without sessions with the names `partitioned-queue-sessions` and `partitioned-queue`.(These queue names are populated in the samples)
2. `ts-node sample-session.ts` should run the sample (with maxMessageCount=10000 and maxWaitTime=1000)
3. `ts-node sample-non-sessions.ts` should run the sample without sessions
### Enabling rhea logs
1. `set DEBUG=rhea*` in the command-line
2. Console output and the debug logs go into the `out.log` file.
```bash
ts-node sample-session.ts >out.log 2>&1
```
### Cases to try out to observe the difference/anomalous behaviour
1. `ts-node sample-session.ts >out-1.log 2>&1` (with maxMessageCount=10000 and maxWaitTime=1000)
- 2047 messages are received and drain hangs
2. `ts-node sample-session.ts >out-2.log 2>&1` (with maxMessageCount=1000 and maxWaitTime=1000)
- drain shouldn't happen since all the messages are received within 1000ms
3. `ts-node sample-session.ts >out-3.log 2>&1` (with maxMessageCount=1000 and maxWaitTime=100)
- drain succeeds
4. `ts-node sample-non-sessions.ts >out-4.log 2>&1` (with maxMessageCount=10000 and maxWaitTime=1000)
- drain succeeds for the non-sessions case
### Reference - https://github.com/Azure/azure-sdk-for-js/issues/8875