-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(microservices): dont catch errors thrown by kafka event handling
Error thrown by event handling method are no longer being caught by RcpExecptionFilter. Instead errors are passed to kafkajs's eachMessage. This results in proper interaction with kafka. This commit closes Kafka commitOffsets #9283.
- Loading branch information
1 parent
5b24f81
commit 77b7bd6
Showing
3 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { RpcExceptionsHandler } from 'exceptions/rpc-exceptions-handler'; | ||
import { Observable } from 'rxjs'; | ||
import { RpcProxy } from './rpc-proxy'; | ||
|
||
export class KafkaRpcProxy extends RpcProxy { | ||
public create( | ||
targetCallback: (...args: unknown[]) => Promise<Observable<any>>, | ||
exceptionsHandler: RpcExceptionsHandler, | ||
): (...args: unknown[]) => Promise<Observable<unknown>> { | ||
return (...args: unknown[]) => { | ||
return targetCallback(...args); | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters