davsclaus commented on code in PR #28336:
URL: https://github.com/apache/camel/pull/28336#discussion_r4364451659


##########
components/camel-keycloak/src/main/docs/keycloak-consumer.adoc:
##########
@@ -466,23 +471,26 @@ from("keycloak:adminEvents"
      + "&delay=10000")
     .process(exchange -> {
         AdminEventRepresentation event = 
exchange.getIn().getBody(AdminEventRepresentation.class);
+        AuthDetailsRepresentation authDetails = event.getAuthDetails();
 
-        // Build audit record
+        // Build audit record (every named parameter of the SQL insert needs a 
value, null included)
         Map<String, Object> auditRecord = new HashMap<>();
-        auditRecord.put("timestamp", new Date(event.getTime()));
+        auditRecord.put("timestamp", event.getTime());

Review Comment:
   The epoch milliseconds are on purpose: the YAML route has no simple way to 
build a `java.util.Date`, and the Java and YAML examples should write the same 
record (to Kafka and to the table). Commit 1b1c-free wording aside, the doc now 
says so: the `timestamp` is in milliseconds since the epoch, the same in the 
JSON record and the table, so the `event_time` column is a `BIGINT`.
   
   _Claude Code on behalf of davsclaus_



##########
components/camel-keycloak/src/main/docs/keycloak-consumer.adoc:
##########
@@ -466,23 +471,26 @@ from("keycloak:adminEvents"
      + "&delay=10000")
     .process(exchange -> {
         AdminEventRepresentation event = 
exchange.getIn().getBody(AdminEventRepresentation.class);
+        AuthDetailsRepresentation authDetails = event.getAuthDetails();
 
-        // Build audit record
+        // Build audit record (every named parameter of the SQL insert needs a 
value, null included)
         Map<String, Object> auditRecord = new HashMap<>();
-        auditRecord.put("timestamp", new Date(event.getTime()));
+        auditRecord.put("timestamp", event.getTime());

Review Comment:
   The epoch milliseconds are on purpose: the YAML route has no simple way to 
build a `java.util.Date`, and the Java and YAML examples should write the same 
record (to Kafka and to the table). The doc now says so in 16218656cdd7: the 
`timestamp` is in milliseconds since the epoch, the same in the JSON record and 
the table, so the `event_time` column is a `BIGINT`.
   
   _Claude Code on behalf of davsclaus_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to