問題タブ [armeria]
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.
armeria - カスタマイズしたスレッド プールに ServiceRequestContext を伝達する方法
armeria リクエストを処理し、いくつかのイベントを にディスパッチするシナリオがありguava
ますEventBus
。問題は、EventBus ハンドラーでイベントを処理している間にコンテキストが失われることです。イベント プロセッサにアクセスさせる方法はありますかServiceRequestContext
。
イベントハンドラを登録します。
これが私のArmeria
サービスです
armeria - Accessing response headers using a decorator in Armeria
I would like to add a decorator to my armeria client that checks each http response if a certain http header was returned:
However, when starting my client it blocks on the join()
call and waits forever. Is there a standard pattern for this in Armeria ? Presumably i cannot just block on the response in an interceptor, but i could not find a way to access the response headers otherwise. Using subscribe
or toDuplicator
did not work any better though.
exception - armeriaのgrpcサービスにリッチエラーモデルを使用する方法はありますか?
gRPC サービスに Armeria 1.3.0 と protobuf を使用しています。例外を処理するときにリッチ エラー モデルを使用しようとしましたが、Armeria は標準エラー モデルしかサポートしていないようです。
Armeria でリッチエラーモデルを使用するにはどうすればよいですか? 例外が発生したときに、カスタム エラー コード/メッセージとエラーの詳細を返したい。
事前にご回答いただきありがとうございます。
log4j2 - log4j2.xml構成でarmeriaのRequestContextカスタム属性を使用するには?
で使用log4j2 2.14.0
していarmeria 1.3.0
ます。armeria のドキュメントによると、logback 構成でRequestContext custom atrributes
使用してエクスポートできることがわかりました。com.linecorp.armeria.common.logback.RequestContextExportingAppender
それで、log4j2.xmlで構成しようとしましたが、うまくいきませんでした。log4j2.xml で設定%X{some_value}
する属性を使用する方法はありますか? または Armeria で ThreadContext (MDC など) を使用することは可能ですか?