azure-servicebus-queues 相关问题

Windows Azure Service Bus Queue,有关中继,主题和队列的问题

使用 Azure ServiceBus 在一个会话中接收一条消息,但在 CompleteMessageAsync 之后

我正在使用 Azure.Messaging.ServiceBus.ServiceBusSessionProcessor 并一次接收一条会话消息,且 AutoCompleteMessages = false。 会不会收不到下一条消息...

回答 1 投票 0

使用 Azure 服务总线队列中的 python-sdk 获取/完成消息时出现异常

azure 服务总线队列中有大约 2M 条消息。我正在尝试使用下面的代码批量消耗 10k 消息。在消耗了大约 8L 条消息后,令人惊讶的是出现了像 Unable to retri...

回答 1 投票 0

使用服务总线 Azure Functions 进行分区队列

有人有使用 Azure Functions 进行服务总线分区队列的经验吗? 我正在努力寻找任何有关如何使用它们以及如何强制可以处理分区的示例...

回答 1 投票 0

从 React 应用程序连接到 azure 服务总线客户端

我需要帮助来了解是否可以从 React 应用程序连接到 Azure 服务总线客户端,并且仍然可以向队列发送消息或从队列接收消息。 我没有在

回答 1 投票 0

Azure 服务总线 AMQP 对象接收器已中止

尝试将消息添加到 Azure 服务总线队列时,有时会收到此错误。谁能解释一下为什么会发生这种情况? 设置是,我们有一个 Azure 持久函数,可以调用...

回答 3 投票 0

Azure 服务总线 JMS Spring 长时间运行作业

我知道这个问题被问了很多次,但我找不到任何好的答案。 所以我有一个 AzureServiceBus,每当新的 xml 文件上传到时,它都会从 AzureBlob 获取新消息...

回答 1 投票 0

如何根据python中的序列号将消息移动到azure服务总线中的死信队列

我想根据序列号从 Azure 服务总线队列读取消息并将这些消息移动到死信队列 我可以从服务总线队列中读取消息,但不能读取...

回答 1 投票 0

每当升级到 azure servicebus 时,JMS 消息侦听器的设置都会失败

当 servicebus 对其系统进行升级时,我收到警告日志。 目标“队列名称”的 JMS 消息侦听器调用程序设置失败 - 尝试恢复。原因:本地交易无法...

回答 1 投票 0

Azure Servicebus 队列正在锁定我的 Java 8 程序中的消息或队列

我有 2 个 Azure 服务总线队列:队列 1 和队列 2。我想用 Java 在这两个队列之间复制或移动消息。我在 Azure 的 Maven 文件中使用这些依赖项: 我有 2 个 Azure 服务总线队列:队列 1 和队列 2。我想用 Java 在这两个队列之间复制或移动消息。我在 Azure 的 Maven 文件中使用这些依赖项: <dependency> <groupId>com.azure</groupId> <artifactId>azure-messaging-servicebus</artifactId> <version>7.13.2</version> </dependency> <dependency> <groupId>com.microsoft.azure</groupId> <artifactId>azure</artifactId> <version>1.41.4</version> </dependency> 我使用此代码创建我的 Azure receiveClient 和 senderClient: this.receiverClient = new ServiceBusClientBuilder() .connectionString(props.getProperty("connection-string")) .receiver() .queueName(props.getProperty("queue1")) .receiveMode(ServiceBusReceiveMode.PEEK_LOCK) .buildClient(); this.senderClient = new ServiceBusClientBuilder() .connectionString(props.getProperty("connection-string")) .sender() .queueName(props.getProperty("queue2")) .buildClient(); 我使用一个函数将消息从队列1复制或移动到队列2,如下所示: public void readMessagesFromQueue() { //"number of messages" is 1500 and the "duration-read-queue" is 100 IterableStream<ServiceBusReceivedMessage> messages = receiverClient.receiveMessages(Integer.parseInt(props.getProperty("number of messages")), Duration.ofSeconds(Long.parseLong(props.getProperty("duration-read-queue")))); for (ServiceBusReceivedMessage serviceBusReceivedMessage : messages) { String messageBody = serviceBusReceivedMessage.getBody().toString(); Map<String, Object> mapQueueProperties = serviceBusReceivedMessage.getApplicationProperties(); ServiceBusMessage serviceBusMessage = new ServiceBusMessage(messageBody); serviceBusMessage.getApplicationProperties().putAll(mapQueueProperties); //write the message to the local file system as a file and also the propertys writeMessageToFile(serviceBusMessage.getBody().toString(), fileTeller); writePropertiesToFile(serviceBusMessage.getApplicationProperties(), fileTeller); senderClient.sendMessage(serviceBusMessage); //if it is a move from queue to queue the original message must be deleted //if it is a copy from queue to queue the original message must NOT be deleted if (props.getProperty("copy").trim().startsWith("move")) { receiverClient.complete(serviceBusReceivedMessage); } else if (props.getProperty("copy").trim().startsWith("copy")) { receiverClient.abandon(serviceBusReceivedMessage); } } receiverClient.close(); senderClient.close(); } 当我运行程序时有时会出现错误。例如,当我将 1300 条消息从队列 1 移动到队列 2 时,它运行良好。 但是当我在一分钟左右的时间内将消息从队列 2 复制回队列 1 时,就会出现如下错误: 未通过接收链接交付。 2023-08-10 07:51:34 错误 MqWorkService:230 - com.azure.messaging.servicebus.ServiceBusException:未在接收链接上传递。 2023-08-10 07:51:34 错误 MqWorkService:230 - 在 com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient.lambda$updateDisposition$52(ServiceBusReceiverAsyncClient.java:1478) 错误发生在这行代码: receiverClient.complete(serviceBusReceivedMessage); 当我等待5分钟左右时,有时会发生复制,有时我需要等待10分钟或15分钟。 所以目前这是一个非常不可靠的排队系统。 我们使用标准的 Azure ServiceBus 许可证。在 Azure 服务总线门户中创建队列时,消息锁定持续时间为 10 秒。 此外,当 Java 程序在成功处理消息后关闭时,应用程序退出前需要整整一分钟。我可以使用这样的东西吗: System.exit(0) 为了更快退出? 我做错了什么,为什么会出现这些错误? 我认为队列上一定有一些锁,但为什么? 在错误中还引用了 ServiceBusReceiverAsyncClient。但在我的代码中,我只使用 ServiceBusReceiverClient 而不是 Async。 问题是我试图立即处理大量消息。因此,我重建了我的解决方案,以便每批最多处理 100 条消息。 感谢肖恩的支持。

回答 1 投票 0

服务总线如何保证并发?

我正在尝试在订阅服务总线的函数应用程序中实现一些有保证的并发性。 为了实现这一目标,我在服务总线中实现了分区。 如果我的消息分布在服务中...

回答 1 投票 0

Azure 门户中的 Azure 服务总线队列发送消息错误

我正在尝试使用服务总线资源管理器向服务总线中的队列发送消息。消息类型为 json,出现以下错误。 { “文件路径”:“/testing/myfolder/test.json&

回答 1 投票 0

Microsoft.Azure.ServiceBus.ServiceBusException - 向 Azure 服务总线主题队列发送消息

我的应用程序中有以下代码片段,用于将消息发送到 Azure 服务总线主题队列。我在发送消息期间随机收到通用 ServiceBusException。 变种

回答 1 投票 0

当 Azure 服务总线中发生死信时,如何确保在启用会话的队列/订阅上有序传递消息

我正在构建一个集成项目,其中涉及使用Azure服务总线主题订阅和订阅该主题的Azure函数应用程序。我的基本要求是...

回答 0 投票 0

如何将消息重定向到死信队列Azure服务总线

我正在使用隔离的azure函数从队列接收消息。我需要验证收到的消息,如果无效,则将其发送到死信队列。我发现唯一的方法是......

回答 1 投票 0

Net 6.0 从 appsettings 而不是 local.settings.json 设置 ServiceBusTrigger QueueName 和 Connection

我有一个 ServiceBusTrigger public async Task Run( [ServiceBusTrigger("%QueueName%", Connection = "ServiceBus")] 我可以在 &

回答 1 投票 0

Azure 服务总线队列 - 如何防止 IHostedService 立即处理队列消息

背景 - 我在 Azure 服务总线队列上创建和放置消息,并使用 IHostedService 处理消息。 问题 - 有什么方法可以在我的 IHostedService 中创建延迟

回答 2 投票 0

ServiceBusSessionReceiverAsyncClient 在关闭期间抛出 IllegalStateException

使用 ServicebusSessionReceiverAsyncClient 从服务总线队列接收单个消息时,会抛出 IllegalStateException。该消息提到尝试将积分添加到已经

回答 0 投票 0

根据 ef-core 事务状态发送或不更改 azure 服务总线

我正在构建一个功能,用于记录对 ef-core 事务中的实体所做的所有更改。 我从更改跟踪器获取更改并将其发送到服务总线队列 但是我有一个问题,如果我发送

回答 1 投票 0

如何访问 Azure 订阅中的死信子队列?

当我使用以下内容时: var deadLetterPath = SubscriptionClient.FormatDeadLetterPath(topicPath,subName); var client = SubscriptionClient.CreateFromConnectionString(connectionString, deadLetterPa...

回答 6 投票 0

您能否根据 .NET 的条件从服务总线队列中取出消息?

我目前有一个服务总线队列,它通过 HTTP 触发器接收消息,并通过服务总线触发器提取消息。 Service Bus Triger 消息被发送到 Web 应用程序到

回答 0 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.