MassTransit JobConsumer: (0x80131904): Incorrect syntax near the keyword 'UPDATE'


I try to start MassTransit/Sample-JobConsumer on EntityFramework Core, but having strange error

(0x80131904): Incorrect syntax near the keyword 'UPDATE'

Steps to reproduce:

  1. Clone MassTransit/Sample-JobConsumer

  2. Remove PostgreSQL an install EntityFrameworkCore

  3. Command Update-Database creates a correct database enter image description here

  4. Start project JobService.Service enter image description here

  5. Post request from Postman (response is valid): enter image description here

  6. RabbitMQ accept requests: enter image description here

  7. But error occured during processing (in console): enter image description here

Please, anyone help me to understand what is happened.

You can see repository on github with EntityFrameworkCore storage implemented

P.S. With default configuration the error was different enter image description here

[Update 1]

After I changed PostgresLockStatementProvider to SqlServerLockStatementProvider (Thanks to Chris Patterson for help). But I`ve got another error: enter image description here

[Update 2]

After I was installed plugin for RabbitMQ everything became works fine with EntityFrameworkCore too! (Thanks to Chris Patterson) enter image description here

asked on Stack Overflow Oct 3, 2020 by Calabonga • edited Oct 6, 2020 by Calabonga

1 Answer


To change to SQL Server, you'd need to change the EF Core configuration to UseSqlServer, you also need to remove the PostgreSQL lock provider (the default lock provider is SqlServer). There are three lines where this change is needed, one for each state machine.

answered on Stack Overflow Oct 3, 2020 by Chris Patterson

User contributions licensed under CC BY-SA 3.0