[NPE] Audit PubSub publisher on Service Factory
Description
PRDE - Story default text according to the team DoR (Definition of Ready)
01 - PERSON OF CONTACT (PERSON THAT CAN ANSWER QUESTIONS ABOUT THE PROBLEM):
@Geny Isam Hamud Herrera
02 - STORY BRIEFING (AS A < PERSONA >, I [WANT TO] < NEED >, [SO THAT] < GOAL >):
03 - PROBLEM (WHAT'S THE CURRENT PROBLEM SCENARIO OR PAIN TO BE RESOLVED?):
Today we create a new Publisher for every message. We need to user the Design Pattern Factory to help on that
04 - GOAL (DESCRIBE THE PROPOSED SOLUTION):
05 - WHO CAN USE THIS FEATURE (USER ROLES):
06 - ACTIVITY DIAGRAM (ACTIVITY DIAGRAM LINK AND IMAGE):
07 - STEPS (ACTIONS TO BE PERFORMED LINKING TO SCREENSHOTS):
08 - ALTERNATIVE STEPS:
09 - ASSETS (FIGMA LINKS, RELEVANT DOCUMENTATION LINKS, JSON EXAMPLES, ETC):
10 - ACCEPTANCE CRITERIA:
- FIX NPE [https://console.cloud.google.com/logs/query;query=resource.type%3D"k8s_container"
severity>%3DWARNING
resource.labels.namespace_name%3D"mdm"
jsonPayload.exception:"java.lang.NullPointerException: null\n\tat com.google.protobuf.Internal.checkNotNull%2528Internal.java:64%2529\n\tat com.google.protobuf.MapField$MutatabilityAwareMap.putAll%2528MapField.java:339%2529\n\tat com.google.pubsub.v1.PubsubMessage$Builder.putAllAttributes%2528PubsubMessage.java:1120%2529\n\tat com.totvslabs.mdm.services.pubsub.AuditMessageProducer.sendMessage%2528AuditMessageProducer.java:51%2529";timeRange=PT6H;cursorTimestamp=2023-06-15T20:10:00.000Z?project=labs-app-mdm-production|https://console.cloud.google.com/logs/query;query=resource.type%3D%22k8s_container%22%0Aseverity%3E%3DWARNING%0Aresource.labels.namespace_name%3D%22mdm%22%0AjsonPayload.exception:%22java.lang.NullPointerException:%20null%5Cn%5Ctat%20com.google.protobuf.Internal.checkNotNull%2528Internal.java:64%2529%5Cn%5Ctat%20com.google.protobuf.MapField$MutatabilityAwareMap.putAll%2528MapField.java:339%2529%5Cn%5Ctat%20com.google.pubsub.v1.PubsubMessage$Builder.putAllAttributes%2528PubsubMessage.java:1120%2529%5Cn%5Ctat%20com.totvslabs.mdm.services.pubsub.AuditMessageProducer.sendMessage%2528AuditMessageProducer.java:51%2529%22;timeRange=PT6H;cursorTimestamp=2023-06-15T20:10:00.000Z?project=labs-app-mdm-production]