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
@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