Skip to content

Releases: zf-fr/zfr-eb-worker

5.3.1

06 Nov 19:08
79cde0a
Compare
Choose a tag to compare
  • Provides a compatibility issue with new message format by adding a name attribute.

6.1.0

23 Oct 20:58
6.1.0
Compare
Choose a tag to compare
  • Add support for http-interop/http-middleware 0.5

6.0.3

30 Aug 14:30
6.0.3
Compare
Choose a tag to compare
  • Fix another issue with validating Docker IP :D.

6.0.2

29 Aug 16:46
6.0.2
Compare
Choose a tag to compare
  • Fix an issue with validating Docker IP detection.

6.0.1

26 Jun 15:46
6.0.1
Compare
Choose a tag to compare
  • Fix an issue with the SilentFailingListener.

6.0.0

09 Apr 04:01
6.0.0
Compare
Choose a tag to compare
  • Dependency has been bumped to PHP 7.1.
  • A new DelayedMessageInterface has now been added.
  • Support for FIFO queues has been added.
  • If you return any 2xx from your worker middleware (like 204), it will now be transformed as 200 before being returned to Elastic Beanstalk, so that those
    messages are also deleted from the queue. Previously, returning a 204 would retry the job.
  • [BC break] Middlewares are now compatible with latest HTTP middlewares interfaces.
  • [BC break] You cannot any longer map multiple middlewares to a single event name. It introduced a lot of complexities to the code and does not map
    well to the new approach of middlewares. A better approach now is to use a command bus mechanism to dispatch to multiple handlers.
  • [BC break] LocalhostCheckerMiddleware has been removed. Now, all the security checks are done within the WorkerMiddleware. Especially, in addition of
    the previous security check that enforced the request to come from localhost, we now also check the user agent to verify the request originated from Amazon.
  • [BC break] Worker route is not added automatically anymore. You will need to manually attach the middleware to the path of your choice.
  • [BC break] The structure of messages has been modified. Previously, a message was encoded this way:
{
  "name": "message_name",
  "payload": {
    "id": "123",
    "other": "value"
  }
}

Now, message body only contain the message content itself:

{
  "id": "123",
  "other": "value"
}

This allows for simpler messages, and prevent parsing the body to get the message name. The message name is now added through a "message attribute"
called "Name".

When a message is pushed by EC2 instances, the SQSD daemon automatically creates headers with the message attributes. In our case, the daemon automatically
adds a header called X-Aws-Sqsd-Attr-Name that contains the message name, which is read by the worker to redirect to the proper listeners.

This has two major consequences:

  1. Messages created using an older version won't be read by the newer version of the worker. This means that you'll need to deploy both your producer and
    consumer applications at the same time to minimize the problems. Once your consumer has been deployed, it may still received some messages coming in the old
    format (those created before the deployment). We recommend you to setup a dead letter queue to be able to gracefully retry your messages after.

  2. Because of the use of SQS attributes, you cannot any longer use this version with old Elastic Beanstalk environments. We therefore recommend you to update
    your worker environments to a 2016 IAM or later so that the daemon properly redirects the attributes.

5.3.0

09 Jan 17:40
Compare
Choose a tag to compare
  • Add support for periodic tasks [#32]

5.2.0

01 Sep 21:49
5.2.0
Compare
Choose a tag to compare
  • Always add a X-Handled-By to the response at the end of the worker pipeline. This allows to make sure that the original response is modified, as
    some middleware frameworks like Zend\Expressive returns a 404 if the response has not been modified at all. [#31]
  • Worker middleware can be simplified to only have ServerRequestInterface as unique parameter. [#30]

5.1.2

27 Jun 17:27
5.1.2
Compare
Choose a tag to compare
  • Fixed a bug that prevented worker middleware to work properly when localhost checker middleware was used

5.1.1

27 Jun 14:30
5.1.1
Compare
Choose a tag to compare
  • Adds support for detecting localhost requests coming from Docker environment