by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 24 17:13
    tonymobster opened #659
  • May 14 19:02

    jeremydmiller on master

    Create initial KafkaEndpoint Create initial KafkaTransport &… Create initial ConfluentKafkaSe… and 79 more (compare)

  • May 14 17:26
    JarrodJ83 synchronize #658
  • May 14 17:00
    JarrodJ83 commented #629
  • May 14 16:59
    JarrodJ83 commented #629
  • May 14 16:30
    JarrodJ83 opened #658
  • May 14 16:17
    JarrodJ83 commented #657
  • May 14 16:17
    JarrodJ83 closed #657
  • May 14 16:14
    JarrodJ83 opened #657
  • May 14 15:20

    jeremydmiller on master

    A minor update to the RaiseAler… (compare)

  • May 14 15:20
    jeremydmiller closed #648
  • May 14 15:19

    dependabot[bot] on bundler

    (compare)

  • May 14 15:19

    jeremydmiller on master

    Bump rake from 10.0.0 to 12.3.3… (compare)

  • May 14 15:19
    jeremydmiller closed #641
  • May 11 15:33
    JarrodJ83 added as member
  • May 10 10:22
    mohammed-fuad opened #656
  • May 04 18:25

    jeremydmiller on master

    updated the samples bumping to 1.1.4 (compare)

  • May 04 17:52

    jeremydmiller on master

    Provides a unit test and soluti… (compare)

  • May 04 17:52
    jeremydmiller closed #655
  • May 03 20:29
    CodingGorilla review_requested #655
Mark Warpool
@CodingGorilla
So along those lines, I had this crazy idea of eliminating "Controllers" and being able to route directly to a command, and have property binding from the request to the command properties. I might try to whip something up along those lines tomorrow. Might be cool to incorporate that into JasperHttp.
Anthony Acquah
@tonymobster

hey all, quick question

when I close the running app using Control-C I get this?

Application is shutting down...
ERROR: System.AggregateException: One or more hosted services failed to stop. (A task was canceled.)
 ---> System.Threa
ding.Tasks.TaskCanceledException: A task was canceled.
   at Jasper.Persistence.Durability.DurabilityAgent.StopAsync(Ca
ncellationToken cancellationToken)
   at Jasper.Runtime.MessagingRoot.StopAsync(CancellationToken cancellationToken)

  at Microsoft.Extensions.Hosting.Internal.Host.StopAsync(CancellationToken cancellationToken)
   --- End of inner exce
ption stack trace ---
   at Microsoft.Extensions.Hosting.Internal.Host.StopAsync(CancellationToken cancellationToken)

   at Oakton.AspNetCore.RunCommand.Execute(RunInput input)
   at Oakton.OaktonCommand`1.Oakton.IOaktonCommand.Execute(O
bject input)
   at Oakton.CommandRun.Execute()
   at Oakton.CommandExecutor.execute(CommandRun run)
[11:04:08 INF] Stopped application

Is that normal, is it something to not worry about or have i configured something wrong?

Jeremy D. Miller
@jeremydmiller
It’s trying to “drain” the outgoing messages most likely, and it took too long. I think. What’s your setup there?
Anthony Acquah
@tonymobster
ok
my setup is currently
Jeremy D. Miller
@jeremydmiller
Or could there be a message being handled at exactly that time that won’t finish or hang?
Anthony Acquah
@tonymobster
public class JasperStartup : JasperOptions
    {
        public JasperStartup() => ServiceName = "NFSP";

        // It's optional, but especially if you're using Jasper for messaging between
        // applications or using the command/persistence, you'll almost certainly need
        // to use application configuration with Jasper
        public override void Configure(IHostEnvironment hosting, IConfiguration config)
        {
            // If we're running in development mode and you don't
            // want to worry about having all the external messaging
            // dependencies up and running, stub them out
            if (hosting.IsDevelopment())
            {
                Extensions.UseMessageTrackingTestingSupport();
                Endpoints.StubAllExternallyOutgoingEndpoints();

                // In development mode, we're just going to have the message persistence
                // schema objects dropped and rebuilt on app startup so you're
                // always starting from a clean slate
                Advanced.StorageProvisioning = StorageProvisioning.Rebuild;
            }

            var connectionString = config.GetConnectionString("NFSP");

            Extensions.PersistMessagesWithPostgresql(connectionString);

            Endpoints
                .LocalQueue("airtime")
                .Durable();

            Endpoints
                .LocalQueue("merchant-transactions")
                .Durable();

            Endpoints
                .LocalQueue("subscriber-transactions")
                .Durable();

            Endpoints
                .LocalQueue("webhook-queue")
                .Durable();

            Endpoints.Publish(x =>
            {
                x.Message<AirtimePurchaseRequest>();
                x.ToLocalQueue("airtime");
            });

            Endpoints.Publish(x =>
            {
                x.Message<MerchantTransactionRequest>();
                x.ToLocalQueue("merchant-transactions");
            });

            Endpoints.Publish(x =>
            {
                x.Message<MerchantTransactionJob>();
                x.ToLocalQueue("merchant-transactions");
            });

            Endpoints.Publish(x =>
            {
                x.Message<MobileMoneyTransactionCompleted>();
                x.ToLocalQueue("webhook-queue");
            });

            Endpoints.Publish(x =>
            {
                x.Message<WebhookEvent>();
                x.ToLocalQueue("webhook-queue");
            });
        }
    }
I doubt there's a message being handled at that time, it always happens even when I just start and stop
Jeremy D. Miller
@jeremydmiller
You can make multiple calls to Message<T>() inside one single Publish() nested closure btw.
Anthony Acquah
@tonymobster
_facepalm
lol
i'll clean that up
Jeremy D. Miller
@jeremydmiller
And the calls to Durable() can be done inside a nested closure too.
Would it help to have some kind of AllAreDurable()or something like that to just make all the endpoints be durable?
Anthony Acquah
@tonymobster
to make all queues registered within the closure durable? Yeah that would be nice
I think that makes sense for apps like mine, where I just want to queue some work to run durably in the background from my controllers
all in a single app, so I want durable listeners but no outbox support for publishing since it's just publishing to itself in-memory
Jeremy D. Miller
@jeremydmiller
So that message isn’t a huge concern, but it’s still annoying. I can look into it a bit on my end
Anthony Acquah
@tonymobster
yes it isn't a concern really, it just occurs every single time so was curious especially since i'm not using the outbox so there shouldn't be any work for it to drain
but it's no deal breaker
thanks for the feedback
and the awesome frameworks
Jeremy D. Miller
@jeremydmiller
Every time you send or process a message there’s going to be some DB activity though
Anthony Acquah
@tonymobster
oh ok
even sending without outbox support? Processing via durable queues I expect that
but I though I could sending to a queue without outbox support worked kinda like the in-memory mediator mode?
Jeremy D. Miller
@jeremydmiller
Pretty well the same thing. If it’s durable, Jasper is persisting the message until it’s successfully processed, then deleting it. It’s trying to achieve guaranteed delivery locally
Anthony Acquah
@anthony.acquah_gitlab
Got it
Anthony Acquah
@tonymobster
Jeremy D. Miller
@jeremydmiller
Yup.
I think that’ll make a big difference for things like validation. Already seen somebody doing an INotifyPropertyChanged implementation with it
Anthony Acquah
@tonymobster
:+1:
the design and rationale behind it is a bit like jasper middleware/lamar codegeneration
Jeremy D. Miller
@jeremydmiller
Definitely. I’ve know the source generator thing was coming. So far though, I don’t know that it’s going to apply to Jasper. Maybe to short circuit type discovery
Jasper / Lamar actually does have a model to pre-generate the code ahead of time, then discover the handler classes from the assembly at runtime
Mark Warpool
@CodingGorilla
@jeremydmiller If you get a chance, could you take a look at #655 , I keep bumping into this issue.
Jeremy D. Miller
@jeremydmiller
@CodingGorilla v1.1.4 will have that PR as soon as Nuget catches up. Sorry for the delay
Mark Warpool
@CodingGorilla
No problem, thanks for the quick turn around!
Anthony Acquah
@tonymobster

@jeremydmiller I think i found a few issues with the ef core/postgres storage support

  1. The creation sql script uses VARCHAR(250) columns which causes inserts to fail in the dead letter table when messages exceed the 250 chars limit. This causes lots of retries every few seconds(probably stops after some max retry limit. Also the exception details has "IsTransient": false is there a way to check that to decide if it should be retried?) which constantly fail.

  2. The creation script is run on app startup(I'm not sure under which conditions) and it seems to do some sort of schema compare so even though my initial ef core migration uses text columns and even when I manually modify it in the database they get dropped and recreated when the app restarts.

  3. The ef core MapEnvelopeStorage function uses map.ToTable($"{schemaName}.jasper_dead_letters"); with a default schema name of "dbo" which when set or changed to a new value and used in conjunction with ef core snake case name translation creates a table named schemaName_jasper_dead_letters(the schema name becomes part of the table name) which means on app startup it ignores this table and creates a new table named public.jasper_dead_letters(which is right) with the restrictive column length defaults. Calling the MapEnvelopeStorage function with an empty string fixes the above table name "issue" but app startup still recreates the table with the restrictive defaults.

Jeremy D. Miller
@jeremydmiller
1.) I’ll happily take a PR to set that to max
2.) That’s documented. You have to opt into that behavior, so you’ve got that configured somewhere in your application. I think the example apps show you how to just enable that at development time.
3.) I’ll also happily take a PR because I’m not sure what your setup is
Anthony Acquah
@anthony.acquah_gitlab
Oh I see. I'll RTFM and work on the PRs. Thanks
Anthony Acquah
@tonymobster
For 1. would you mind if I change to a text column instead of VARCHAR(MAX)? And for 3. was it intentional that only DeadLetterEnvelope prepends schemaName to the table name?
Jeremy D. Miller
@jeremydmiller
it’s not purposeful. I think that’s okay to make the database change. It’s technically a breaking change, but I don’t think anybody uses it now
Anthony Acquah
@tonymobster
cool, i'll stick to varchar(max) to avoid the breaking change since switching to text doesn't provide much benefit. I'll add schema name to the others for consistency
Anthony Acquah
@tonymobster
This message was deleted
Anthony Acquah
@tonymobster
also the EnvelopeStatus enum mapped to varchar(25) in the script but ef core maps it to an int by default for postgres which causes the query to fail. I'll fix that as well
Jeremy D. Miller
@jeremydmiller
Oh, good catch. I hadn’t tested it w/ EF + Postgresql
Anthony Acquah
@anthony.acquah_gitlab
Submitted the PRs @jeremydmiller take a look whenever you have time
Jeremy D. Miller
@jeremydmiller
Will do
Hopefully today, but you know how that goes