[add]: loan_repayment event
This commit is contained in:
@@ -43,9 +43,9 @@ class KafkaIntegration:
|
||||
|
||||
|
||||
@staticmethod
|
||||
def send_loan_request(loan_data, request_id):
|
||||
def send_loan_request(loan_data, request_id, topic):
|
||||
"""
|
||||
Send loan request to PROCESS_PAYMENT topic
|
||||
Send loan request to topic
|
||||
|
||||
Args:
|
||||
loan_data: Loan request payload as dict
|
||||
@@ -58,7 +58,7 @@ class KafkaIntegration:
|
||||
|
||||
# Sending loan request message to Kafka
|
||||
producer.produce(
|
||||
topic="PROCESS_PAYMENT",
|
||||
topic=topic,
|
||||
key=str(request_id),
|
||||
value=json.dumps(loan_data).encode("utf-8"),
|
||||
callback=KafkaIntegration.delivery_report,
|
||||
|
||||
Reference in New Issue
Block a user