Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Service Bus Queue session is enabled #1024

Open
Oleksandr-Yushchenko opened this issue Mar 24, 2023 · 0 comments
Open

Service Bus Queue session is enabled #1024

Oleksandr-Yushchenko opened this issue Mar 24, 2023 · 0 comments

Comments

@Oleksandr-Yushchenko
Copy link

Service Bus Queue session is enabled, so the listener must be configured with the option for
session.

Is it possible to read messages from Service Bus Queue with session enabled? Looks like this SDK does not allow it.
I'm trying to read messages:

$this->serviceBusRestProxy = ServicesBuilder::getInstance()->createServiceBusService($connectionString);
$options = new ReceiveMessageOptions();
$options->setPeekLock();
// Receive message.
$message = $this->serviceBusRestProxy->receiveQueueMessage($queue_name, $options);

And got error from message serviceBusRestProxy:

Fail:
Code: 405
Value: Method Not Allowed
details (if any): <Error><Code>405</Code><Detail>It is not possible for an entity that requires sessions to create a non-sessionful message receiver. TrackingId:xxxxxxxxxxxxx, SystemTracker:XXXXXXXXXX:Queue:XXXXXXXXXXXX, Timestamp:2023-03-16T10:38:22</Detail></Error>.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant