
com.microsoft.azure.functions.rabbitmq.annotation.RabbitMQTrigger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-functions-java-library-rabbitmq Show documentation
Show all versions of azure-functions-java-library-rabbitmq Show documentation
This package contains all Java interfaces and annotations to interact with Microsoft Azure Functions runtime for RabbitMQ Service.
The newest version!
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.functions.rabbitmq.annotation;
import com.microsoft.azure.functions.annotation.CustomBinding;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
*
* Java annotation used to bind a parameter to RabbitMQ trigger message. The
* type of parameter can be a native Java type such as int
,
* String
or byte[]
or a POJO.
*
*
*
* Example function that uses a RabbitMQ trigger binding:
*
*
*
* @FunctionName("RabbitMQExample")
* public void run(
* @RabbitMQTrigger(connectionStringSetting = "ConnectionString", queueName = "input-queue") String message,
* final ExecutionContext context) {
* context.getLogger().info("Java RabbitMQ trigger function processed a message: " + message);
* }
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@CustomBinding(direction = "in", name = "inputMessage", type = "rabbitMqTrigger")
public @interface RabbitMQTrigger {
/**
* Setting name for RabbitMQ connection URI.
* @return Setting name for RabbitMQ connection URI.
*/
String connectionStringSetting() default "";
/**
* Defines how Functions runtime should treat the parameter value. Possible values are:
*
* - "": get the value as a string, and try to deserialize to actual parameter type like POJO
* - string: always get the value as a string
* - binary: get the value as a binary data, and try to deserialize to actual parameter type byte[]
*
*
* @return The dataType which will be used by the Functions runtime.
*/
String dataType() default "";
/**
* Whether certificate validation should be disabled. Not recommended for production. Does not apply when SSL is
* disabled.
*
* @return Whether certificate validation should be disabled.
*/
boolean disableCertificateValidation() default false;
/**
* RabbitMQ queue name.
* @return RabbitMQ queue name.
*/
String queueName() default "";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy