-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mojaloop/#3498): alter message keys for prepare, fulfil and timeout #965
Conversation
@@ -198,7 +198,9 @@ const prepare = async (error, messages) => { | |||
Logger.isInfoEnabled && Logger.info(Util.breadcrumb(location, `positionTopic1--${actionLetter}7`)) | |||
functionality = TransferEventType.POSITION | |||
const eventDetail = { functionality, action } | |||
await Kafka.proceed(Config.KAFKA_CONFIG, params, { consumerCommit, eventDetail, toDestination }) | |||
// Key position prepare message with payer account id | |||
const payerAccount = await Participant.getAccountByNameAndCurrency(payload.payerFsp, payload.amount.currency, Enum.Accounts.LedgerAccountType.POSITION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this particular case here(happy path), if we want to save a DB query, the participant account id is already fetched in saveTransferPrepared of facade. You can pass it down to access here. But as long as the query is cached, I don't think its a must. @mdebarros What do you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets create a story for this. The reason I say that is because this in practice shouldn't be an issue as long as caching is enabled.
We should definitely look at such improvements going forward. A dedicated story may also give us the opportunities to reduce other similar duplicate queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created a story to optimize duplicated queries for participant currency id with a clause to investigate other instances of duplicated queries (still updating the story, just a placeholder) mojaloop/project#3515
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
feat(mojaloop/#3498): alter message keys for prepare, fulfil and timeout - mojaloop/project#3498
central-services-shared
proceed to lib with simplified keying logicNOTIFICATION
messages in transfers handler