問題タブ [messaging]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
234 参照

messaging - ポートを介したメッセージのリッスンと受信

C# で lanmessenger を作成しています。そして、ポートを介してメッセージを送受信するためのコードがありますが、それらの使用方法に関して「マイナーな」混乱があります。各イベントで着信メッセージを受信するポートをリッスンする関数を常に呼び出す必要がありますか?..その場合、メッセージを送信する関数をどのように呼び出すのですか?

0 投票する
1 に答える
2833 参照

messaging - ActiveMQ distribution of messages

I have several servers that produce xml files from Python and some other servers that consume those xmls using Java. I've only recently looked into JMS and ActiveMQ and decided to try using it to pass the xml files.

So I set up ActiveMQ daemons on the consumer servers and figured I'd implement some cycling method on the produces to distribute the xmls evenly across the consumers.

For testing, I ran one producer and one consumer and looked at the results.

To my surprise, the messages from the producer were distributed across all the ActiveMQ servers on the network. Since I only ran one consumer it only received the xmls that got to the ActiveMQ daemon on that machine, and the rest of the xmls were waiting patiently on the other ActiveMQ daemons on other machines.

EDIT: This is not what actually happened, sorry. See below for details

Now, I'm not complaining, since this is what I wanted anyway, but I'm a little confused: what is the proper way to implement this many-to-many queue that I'm after?

Should I set up ActiveMQ daemons on my producer machines as well, send the xmls to the localhost ActiveMQs and trust the automatic discovery to get the xmls to consumers?

Should I stick to my original plan, and cycle the messages across the consumer machines, just to be safe?

Or is there an API I should use that hide those details from my processes?

BTW, the producers are python processes using STOMP and the consumers are java using JMS.

I apologize if your eyes are hurting from my crappy ASCII art, I wasn't sure if I'm being clear enough with just words.

EDIT

Apparently, when I was running "one producer and one consumer" I didn't notice that the other consumers were already running. They were just not doing anything useful with the xmls they processed. That's why I was seeing partial results.

After reading a bit more and experimenting a little, I figured out the following:

By default, ActiveMQ will auto-discover other ActiveMQ instances on the local network, and create a store-and-forward network of brokers. This means that the producer can post the xmls to any ActiveMQ instance and they will find their way to consumers listening on other ActiveMQ instances on the same network.

Note that the documentation claims that auto-discovery is not recommended for production setups.

The accepted answer below still holds true, though. The simplest way to use ActiveMQ is just use one or two servers as "Queue Servers". Nevertheless, I chose to go with my original plan, because I think it will reduce network traffic (with a middle server, xmls have to go into it and the out of it again).

0 投票する
1 に答える
2806 参照

jms - ActiveMQメッセージグループ化のパフォーマンス

ActiveMQのメッセージグループ化機能を使用した人はいますか?

http://activemq.apache.org/message-groups.html

これは、私が取り組んでいるプロジェクトにとって非常に便利な機能ですが、この機能の拡張性とパフォーマンスに興味があります。私たちのシステムでは、メッセージを約3〜5個のメッセージのグループにグループ化する必要があるため、プロセスの実行中にグループを継続的に追加します。この場合、最終的にはすべてのグループを保存しようとしてメモリが不足するようです。

私はどんな経験/考え/賛否両論にも興味があります。

0 投票する
5 に答える
1283 参照

.net - .NET からアクセスできる永続サブスクライバを実装するには、どのテクノロジを使用すればよいですか?

グリーン フィールド プロジェクトを想定すると、どのテクノロジ、ライブラリ、ミドルウェアなどを選択すれば、Windows と .NET で永続的なサブスクリプションを使用してパブリッシュ/サブスクライブ メッセージングを実装するのが最も簡単になりますか? Google を使用して WCF Peer Channel を見つけました。これは、必要なことのほとんどを行っているようですが、メッセージの順序を保証するものではなく、信頼性のためにメッセージをディスクに保持するものではないと思います。マイクロソフトは、これらの機能を上に重ねることができると言っていますが、私はそれらの機能を既に備えているものを探していました。

MSMQ 配布リストは私が望むものに近いものですが、メッセージング レイヤーが事前にすべてのクライアントについて知る必要がないものが望ましいです。

加入者数は多くなく、おそらく 20 人未満です。

パブリッシャーとサブスクライバーの両方が C#/.NET で実装され、Windows 上で実行されます。

編集: メッセージ指向のミドルウェアとサービス バスの提案を検討しています。私はこの分野のエンタープライズ向けの製品に精通しており、シンプルで軽量なものを本当に探しています。各製品を見るには少し時間がかかりますが、調査結果をまとめてみます。

0 投票する
3 に答える
18562 参照

.net - メッセージ バス アーキテクチャの実装

私は現在、会社で新しいメッセージ バス アーキテクチャの分析と設計を行っています。私は過去に MSMQ でこのようなことを試みましたが、うまく機能し、このプロジェクトで同じことを再度行うことを考えていましたが、System.Messaging API を使用する代わりに API として WCF を使用していました。WCF で MSMQ を使用した経験のある人はいますか? System.Messaging API より使いやすいですか? System.Messaging またはその逆で WCF を使用する利点は何ですか?

0 投票する
4 に答える
582 参照

message-queue - メッセージング/メッセージ キューイングに関する経験則

メッセージ キューをいつ使用するか、また実際にどのような問題に対処する必要があるかについて、経験則を教えてもらえますか?

ありがとう

0 投票する
3 に答える
2095 参照

wcf - netMSMQbinding を使用した注文済み配送

WCF netMSMQbinding を使用すると、順序どおりの配信を保証できますか?

挿入コマンドに続いて多数の更新コマンドを同じキューに入れていますが、時折、更新の 1 つが挿入よりも優先されます。

広範なログを追加すると、それらが正しい順序でキューに追加され、異なる順序で処理されていることが明らかです。

この動作が予想されることを示すいくつかの記事を Google で検索しましたが、どうにかして順序付けられるように構成する必要があるようです。

私たちのキューはトランザクションであるため、シーケンス番号を追加して宛先で再シーケンスすることは機能しないと思います。トランザクション性が失われるためです。

属性を追加する[DeliveryRequirements(RequireOrderedDelivery=true, QueuedDeliveryRequirements=QueuedDeliveryRequirementsMode.Require)]と、次のエラーが発生します。

コントラクト「IService」の DeliveryRequirementsAttribute は、NotAllowed の QueuedDeliveryRequirements 値を指定します。ただし、このコントラクト用に構成されたバインディングは、キュー配信をサポートすることを指定しています。キューに入れられたバインディングは、このコントラクトでは使用できません。

すべてが正しくセットアップされているように見えるため、このエラーが発生する理由がわかりません。ただし、この設定がMSMQで許可されていることを確認することはできませんでした.WS-RM設定のようであり、知る限りnetMSMQBindingはWS-RMをサポートしていません.

0 投票する
6 に答える
4335 参照

architecture - メッセージ ブローカーが何に使用されるか説明できますか?

私の仕事の分野では、誰かが MQ シリーズや MSMQ などの長所を称賛せずに 5 分間過ごすことは困難であり、バズワードのきらめきが過ぎ去った後、これらの素晴らしいデバイスのいくつかの実際のは、現実の世界。

私が探しているのは、これらのいずれかの用途を見つけるきっかけになるもの、またはメッセージ バス/メッセージ ブローカー/メッセージ キューを評価するために使用できる何らかのメトリックを提供してくれるものです。前述のメッセージ*の違いは何ですか。

0 投票する
6 に答える
1206 参照

sms - Twitter のように SMS メッセージを送信するにはどうすればよいですか?

すべての携帯電話会社は、Twitter のように SMS メッセージを送信できるオープン API を持っていますか?

これを行うには料金を支払う必要がありますか?