Skip to content

Commit

Permalink
#46 - Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ttimot24 committed Sep 20, 2024
1 parent 4678bad commit 8c3aa11
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public Producer<String, SpecificRecordBase> createProducer(String clientId, Stri
Properties props = new Properties();
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServer);
props.put(ProducerConfig.CLIENT_ID_CONFIG, clientId);
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, optionalProperties.getOrDefault(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName()));
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, optionalProperties.getOrDefault(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class.getName()));
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class.getName());
props.putAll(optionalProperties);

return new KafkaProducer<>(props);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.github.snuk87.keycloak.kafka.mapper;

import com.github.snuk87.keycloak.kafka.dto.AuthDetails;
import com.github.snuk87.keycloak.kafka.dto.KeycloakAdminEvent;
import com.github.snuk87.keycloak.kafka.dto.KeycloakEvent;
import com.github.snuk87.keycloak.kafka.dto.OperationType;
import org.keycloak.kafka.dto.AuthDetails;
import org.keycloak.kafka.dto.KeycloakAdminEvent;
import org.keycloak.kafka.dto.KeycloakEvent;
import org.keycloak.kafka.dto.OperationType;
import org.keycloak.events.Event;
import org.keycloak.events.admin.AdminEvent;

import java.util.Map;
import java.util.Optional;

public class KeycloakMapper {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/avro/keycloak-admin-events-value.avsc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "record",
"name": "KeycloakAdminEvent",
"namespace": "com.github.snuk87.keycloak.kafka.dto",
"namespace": "org.keycloak.kafka.dto",
"fields": [
{
"name": "authDetails",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/avro/keycloak-events-value.avsc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "record",
"name": "KeycloakEvent",
"namespace": "com.github.snuk87.keycloak.kafka.dto",
"namespace": "org.keycloak.kafka.dto",
"fields": [
{
"name": "clientId",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.github.snuk87.keycloak.kafka;

import com.github.snuk87.keycloak.kafka.dto.KeycloakAdminEvent;
import org.keycloak.kafka.dto.KeycloakAdminEvent;
import org.apache.avro.Schema;
import org.apache.kafka.clients.admin.Admin;
import org.junit.jupiter.api.Test;
import io.confluent.kafka.schemaregistry.avro.AvroSchemaUtils;
import org.keycloak.events.Event;
Expand Down

0 comments on commit 8c3aa11

Please sign in to comment.