All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tvd12.ezymq.kafka.serialization.EzyDefaultSerializer Maven / Gradle / Ivy

There is a newer version: 1.2.5
Show newest version
package com.tvd12.ezymq.kafka.serialization;

import java.util.Map;

import org.apache.kafka.common.serialization.Serializer;

public class EzyDefaultSerializer implements Serializer {

	@Override
	public void configure(Map configs, boolean isKey) {}

	@Override
	public byte[] serialize(String topic, Object object) {
		if(object instanceof String)
			return ((String)object).getBytes();
		return (byte[])object;
	}
	
	@Override
	public void close() {}
	
}