Skip to content

Releases: Azure/azure-functions-java-library

Release azure-functions-java-library 3.1.0

14 Nov 18:14
f7a5313
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.0.0...3.1.0

Release azure-functions-java-library 3.0.0

02 Dec 19:36
2387b6b
Compare
Choose a tag to compare

New

azure-functions-java-library v3 - Updating cosmos DB annotations to support v4 extension bundle. #188

azure-functions-java-library v2 - will continue to use the old annotations supporting v3 extension bundle.

Release azure-functions-java-library 3.0.0-SNAPSHOT

09 Nov 17:41
5fe66b0
Compare
Choose a tag to compare

New

azure-functions-java-library v3 - Updating cosmos DB annotations to support v4 extension bundle. #188

azure-functions-java-library v2 - will continue to use the old annotations supporting v3 extension bundle.

Release azure-functions-java-library 2.2.0

28 Oct 17:02
3f7a634
Compare
Choose a tag to compare

New

  • Update azure-functions-core-library to 1.2.0 #186

Release azure-functions-java-library 2.1.0

10 Oct 17:00
6e8d6f7
Compare
Choose a tag to compare

Release azure-functions-java-library 2.0.1

11 May 22:04
Compare
Choose a tag to compare

Release azure-functions-java-library 2.0.1-SNAPSHOT

07 Apr 22:34
c150118
Compare
Choose a tag to compare

Add a new annotation HasImplicitOutput which support function return value if it's value is set to true (By default it's true).

Release azure-functions-java-library 2.0.0

28 Mar 20:33
Compare
Choose a tag to compare

Restructured azure-functions-java-library. Now, it only contains annotations related to triggers and bindings. The rest files can be find in azure-functions-java-core-library. This help to decouple between java library and java worker.

Azure Functions Java Library 1.4.2

28 Jan 04:33
2b4b6ab
Compare
Choose a tag to compare

Azure Functions Java Library 1.4.2-SNAPSHOT

21 Jan 01:06
0098603
Compare
Choose a tag to compare

Add support for Retry policies

For more details

FixedDelayRetry sample

    @FunctionName("HttpExampleRetry")
    @FixedDelayRetry(maxRetryCount = 3, delayInterval = "00:00:05")
    public HttpResponseMessage runRetry(
            @HttpTrigger(
                    name = "req",
                    methods = {HttpMethod.GET, HttpMethod.POST},
                    authLevel = AuthorizationLevel.ANONYMOUS)
                    HttpRequestMessage<Optional<String>> request,
            final ExecutionContext context) throws Exception {
        context.getLogger().info("Java HTTP trigger processed a request.");

        // Parse query parameter
        final String query = request.getQueryParameters().get("name");
        final String name = request.getBody().orElse(query);

        if (name == null) {
            return request.createResponseBuilder(HttpStatus.BAD_REQUEST).body("Please pass a name on the query string or in the request body").build();
        } else {
            return request.createResponseBuilder(HttpStatus.OK).body(name).build();
        }
    }

ExponentialBackoffRetry sample

    @FunctionName("HttpExampleExponentialBackoffRetry")
    @ExponentialBackoffRetry(maxRetryCount = 3, minimumInterval = "00:00:01", maximumInterval = "00:00:03")
    public HttpResponseMessage runRetryExponentialBackoffRetry(
            @HttpTrigger(
                    name = "req",
                    methods = {HttpMethod.GET, HttpMethod.POST},
                    authLevel = AuthorizationLevel.ANONYMOUS)
                    HttpRequestMessage<Optional<String>> request,
            final ExecutionContext context) throws Exception {
        context.getLogger().info("Java HTTP trigger processed a request.");

        // Parse query parameter
        final String query = request.getQueryParameters().get("name");
        final String name = request.getBody().orElse(query);

        if (name == null) {
            return request.createResponseBuilder(HttpStatus.BAD_REQUEST).body("Please pass a name on the query string or in the request body").build();
        } else {
            return request.createResponseBuilder(HttpStatus.OK).body(name).build();
        }
    }

Add support service batch message for ServiceBusQueueTrigger and ServiceBusTopicTrigger

    @FunctionName("ServiceBusQueueBatchTrigger")
    public void serviceBusQueueBatchTrigger(
            @ServiceBusQueueTrigger(name = "message", queueName = "SBQueueNameBatch", connection = "AzureWebJobsServiceBus", cardinality = Cardinality.MANY, dataType = "String") String[] messages,
            @QueueOutput(name = "output", queueName = "test-servicebusqueuebatch-java", connection = "AzureWebJobsStorage") OutputBinding<String> output,
            final ExecutionContext context
    ) {
        context.getLogger().info("Java Service Bus Queue trigger function processed a message: " + messages[0]);
        output.setValue(messages[0]);
    }
    @FunctionName("ServiceBusTopicBatchTrigger")
    public void serviceBusTopicBatchTrigger(
            @ServiceBusTopicTrigger(name = "message", topicName = "SBTopicNameBatch", subscriptionName="SBTopicNameBatchSubName",connection = "AzureWebJobsServiceBus", cardinality = Cardinality.MANY, dataType = "String") List<String> messages,
            @QueueOutput(name = "output", queueName = "test-servicebustopicbatch-java", connection = "AzureWebJobsStorage") OutputBinding<String> output,
            final ExecutionContext context
    ) {
        context.getLogger().info("Java Service Bus Topic trigger function processed a message: " + messages.get(0));
        output.setValue(messages.get(0));
    }