Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Service Bus - PeekMessage error: fromSequenceNumber should be of type Long #18099

Closed
raufdean opened this issue Oct 8, 2021 · 3 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus

Comments

@raufdean
Copy link

raufdean commented Oct 8, 2021

Servicebus 7.3

Want to be able to peek message queue from the start using the same receiver.

await peekMsgReceiver.peekMessages(100, { fromSequenceNumber: 1});

returns an error: fromSequenceNumber should be of type Long

await peekMsgReceiver.peekMessages(100, { fromSequenceNumber: 0});
does not return messages from the start of the queue.

Doesn't seem anyway of peeking from the beginning of the queue on each call

@ramya-rao-a
Copy link
Contributor

Hey @raufdean

The error is because a number is being passed to the fromSequenceNumber option instead of something of type Long

Can you try await peekMsgReceiver.peekMessages(100, { fromSequenceNumber: new Long(1)}); instead?

import Long from "long";

const msgs = await peekMsgReceiver.peekMessages(100, { fromSequenceNumber: new Long(1)});

@ramya-rao-a ramya-rao-a added Client This issue points to a problem in the data-plane of the library. Service Bus labels Oct 8, 2021
@raufdean
Copy link
Author

raufdean commented Oct 8, 2021

Thanks for the reply, will give it a go!

@ramya-rao-a ramya-rao-a added customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Oct 8, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Oct 8, 2021
@ramya-rao-a ramya-rao-a added issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Oct 8, 2021
@jeremymeng jeremymeng added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Oct 15, 2021
@ghost ghost removed the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Oct 15, 2021
@jeremymeng jeremymeng added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Nov 1, 2021
@ghost
Copy link

ghost commented Nov 1, 2021

Hi @raufdean. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

@ghost ghost removed the needs-author-feedback Workflow: More information is needed from author to address the issue. label Nov 1, 2021
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this issue Mar 7, 2022
Dev sentinel 2022 01 01 preview (Azure#18025)

* Adds base for updating Microsoft.SecurityInsights from version preview/2021-10-01-preview to version 2022-01-01-preview

* Updates readme

* Updates API version in new specs and examples

* SourceControl API 2022-01-01-preview version - adding new attribute to SourceControl model (Azure#17849)

* SourceControl 2022-01-01-preview version change

* fix validation error

* prettified

* prettified

Co-authored-by: debjyoti11 <[email protected]>

* New metadata API (Azure#17942)

* metadata changes

* addressed changes

* updated enum kind

* updated values as well

Co-authored-by: Roey Ben Chaim <[email protected]>

* added new enum to kind (Azure#17994)

Co-authored-by: Roey Ben Chaim <[email protected]>

* Add flag to rotate webhook secret (Azure#17989)

Co-authored-by: debjyoti11 <[email protected]>

* Align definitions with stable version (Azure#17931)

* Align definitions with stable version

* align scheduled rule and template properties with stable

* Note: We are creating a new api-version with this change. Watchlists.json 2022-01-01-preview parameter name changes (Azure#17848)

* changed source to sourceType and watchlistAlias to alias

* Update CreateWatchlistAndWatchlistItems.json

* Update CreateWatchlistItem.json

* Update DeleteWatchlist.json

* Update DeleteWatchlistItem.json

* Update GetWatchlistByAlias.json

* Update GetWatchlistItemById.json

* Update GetWatchlistItems.json

* Update GetWatchlistByAlias.json

* added missing params to match stable version

* Revert "added missing params to match stable version"

This reverts commit a30a709613f94266d0eaba6495c92be43221a282.

Reverting by 1 commit

* refreshing pipeline

* reverting lint diff change

* attempting to fix RemovedPath breaking changes

* Revert "attempting to fix RemovedPath breaking changes"

This reverts commit 2f96ee3c050fde4c166bf730b0a1b5faff07cfc1.

reverting attempt at correcting breaking changes. cannot match preview
to stable without breaking everything.

* adding back source type for backwards compatibility, added response descriptions, corrected PR comments

* adding missing bracket

* ran npm run prettier-fix to correct style issues

* resolving model/definition errors

* Revert "resolving model/definition errors"

This reverts commit fd67a4f813d923965cefad50999010820446a107.

Reverting prettier changes made to other branches

* Revert "ran npm run prettier-fix to correct style issues"

This reverts commit 3055791e00e956fff3a62e24d8313dde96daa00c.

* update

* Update DeleteWatchlist.json

* Update Watchlists.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* fixing styling issues on Delete example

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* ran npm run prettier on DeleteWatchlist.json

* Update Watchlists.json

* reverting alias to watchlistAlias

Co-authored-by: Hassan Chawiche <[email protected]>

* Rename system to AutoAssigned (Azure#18061)

* Rename system to AutoAssigned

* Add example to list operations

* Update API version in NRT examples

* Execute validation tools and fix results (Azure#17733)

* Execute validation tools and fic results

* Prettyfieir GetIoTById.json

* Watchlists.json-2022-01-01-preview-parameterNameChanges (reverted PR reference for files changed -> https://github.com/Azure/azure-rest-api-specs/pull/17848/files) (Azure#18085)

* changed source to sourceType and watchlistAlias to alias

* Update CreateWatchlistAndWatchlistItems.json

* Update CreateWatchlistItem.json

* Update DeleteWatchlist.json

* Update DeleteWatchlistItem.json

* Update GetWatchlistByAlias.json

* Update GetWatchlistItemById.json

* Update GetWatchlistItems.json

* Update GetWatchlistByAlias.json

* added missing params to match stable version

* Revert "added missing params to match stable version"

This reverts commit a30a709613f94266d0eaba6495c92be43221a282.

Reverting by 1 commit

* refreshing pipeline

* reverting lint diff change

* attempting to fix RemovedPath breaking changes

* Revert "attempting to fix RemovedPath breaking changes"

This reverts commit 2f96ee3c050fde4c166bf730b0a1b5faff07cfc1.

reverting attempt at correcting breaking changes. cannot match preview
to stable without breaking everything.

* adding back source type for backwards compatibility, added response descriptions, corrected PR comments

* adding missing bracket

* ran npm run prettier-fix to correct style issues

* resolving model/definition errors

* Revert "resolving model/definition errors"

This reverts commit fd67a4f813d923965cefad50999010820446a107.

Reverting prettier changes made to other branches

* Revert "ran npm run prettier-fix to correct style issues"

This reverts commit 3055791e00e956fff3a62e24d8313dde96daa00c.

* update

* Update DeleteWatchlist.json

* Update Watchlists.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* fixing styling issues on Delete example

* Update DeleteWatchlist.json

* Update DeleteWatchlist.json

* ran npm run prettier on DeleteWatchlist.json

* Update Watchlists.json

* reverting alias to watchlistAlias

* fixing type version

* Update Watchlists.json

* Update DeleteWatchlist.json

* fixing commas

Co-authored-by: Hassan Chawiche <[email protected]>
Co-authored-by: Usman Hasan <[email protected]>

* Done (Azure#17843)

Co-authored-by: Roy Reinhorn <[email protected]>

* AutomationRules 2022-01-01-preview: Add constraints (Azure#18099)

* add contraints (alinged with the latest stable version)

Co-authored-by: debroy <[email protected]>
Co-authored-by: debjyoti11 <[email protected]>
Co-authored-by: RoeyBC <[email protected]>
Co-authored-by: Roey Ben Chaim <[email protected]>
Co-authored-by: Laith Hisham <[email protected]>
Co-authored-by: ushasan <[email protected]>
Co-authored-by: Hassan Chawiche <[email protected]>
Co-authored-by: shschwar <[email protected]>
Co-authored-by: Usman Hasan <[email protected]>
Co-authored-by: royrein <[email protected]>
Co-authored-by: Roy Reinhorn <[email protected]>
Co-authored-by: dosegal <[email protected]>
Co-authored-by: Arthur Ning <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus
Projects
None yet
Development

No branches or pull requests

3 participants