public void Request(Avro.Specific.ICallbackRequestor requestor, string messageName, object[] args, object callback) { switch(messageName) { case "hello": requestor.Request<System.String>(messageName, args, callback); break; case "echo": requestor.Request<org.apache.avro.test.TestRecord>(messageName, args, callback); break; case "add": requestor.Request<System.Int32>(messageName, args, callback); break; case "echoBytes": requestor.Request<System.Byte[]>(messageName, args, callback); break; case "error": requestor.Request<System.Object>(messageName, args, callback); break; case "ack": requestor.Request<System.Object>(messageName, args, callback); break; }; }
public void Request(Avro.Specific.ICallbackRequestor requestor, string messageName, object[] args, object callback) { switch(messageName) { case "TransformName": requestor.Request<System.String>(messageName, args, callback); break; case "hello": requestor.Request<System.String>(messageName, args, callback); break; case "add": requestor.Request<System.Int32>(messageName, args, callback); break; case "divide": requestor.Request<System.Int32>(messageName, args, callback); break; case "heartbeat": requestor.Request<System.Object>(messageName, args, callback); break; }; }
public void Request(Avro.Specific.ICallbackRequestor requestor, string messageName, object[] args, object callback) { switch(messageName) { case "send": requestor.Request<System.String>(messageName, args, callback); break; case "fireandforget": requestor.Request<System.Object>(messageName, args, callback); break; }; }
static public async Task <AvroKafkaProducer <K, T> > GetProducer <K, T>(KafkaConfiguration configuration, string schemaRegistryEndPoint) { var schemaRegistry = new SchemaRegistry(schemaRegistryEndPoint); var keySchema = Avro.GenerateSchema <K>(); await schemaRegistry.RegisterSchema(configuration.Topic, keySchema, true); var valueSchema = Avro.GenerateSchema <T>(); if (!await schemaRegistry.IsSchemaCompatible(configuration.Topic, valueSchema)) { throw new ApplicationException("value schema is not compatible"); } var keySchemaId = await schemaRegistry.GetSchemaId(configuration.Topic, true); var valueSchemaId = await schemaRegistry.GetSchemaId(configuration.Topic); Logger.Info("Creating Kafka Producer for topic: " + configuration.Topic); var producer = new RdKafka.Producer(configuration.KafkaBrokers); var topic = producer.Topic(configuration.Topic); return(new AvroKafkaProducer <K, T>(producer, topic, keySchemaId, valueSchemaId)); }
public abstract void TransformName(HelloAvro.DTO.EmployeeDTO employee, Avro.IO.ICallback<System.String> callback);
public abstract void hello(string name, Avro.IO.ICallback<System.String> callback);
public abstract void divide(int arg1, int arg2, Avro.IO.ICallback<System.Int32> callback);
public void Request(Avro.Specific.ICallbackRequestor requestor, string messageName, object[] args, object callback) { switch(messageName) { case "echo": requestor.Request<org.apache.avro.test.AllTestRecord>(messageName, args, callback); break; case "echoParameters": requestor.Request<org.apache.avro.test.AllTestRecord>(messageName, args, callback); break; }; }
public abstract void send(org.apache.avro.test.Message message, Avro.IO.ICallback<System.String> callback);
// Always throws an error. public abstract void error(Avro.IO.ICallback<System.Object> callback);
public abstract void echoBytes(byte[] data, Avro.IO.ICallback<System.Byte[]> callback);
// Pretend you're in a cave! public abstract void echo(org.apache.avro.test.TestRecord record, Avro.IO.ICallback<org.apache.avro.test.TestRecord> callback);
public abstract void echoParameters(bool booleanTest, int intTest, long longTest, float floatTest, double doubleTest, byte[] bytesTest, string stringTest, org.apache.avro.test.AllEnum enumTest, org.apache.avro.test.FixedTest fixedTest, IList<System.Int64> arrayTest, IDictionary<string,System.Int64> mapTest, org.apache.avro.test.AllTestRecord nestedTest, Avro.IO.ICallback<org.apache.avro.test.AllTestRecord> callback);