Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 30 08:58

    mergify[bot] on master

    Update cats-effect to 3.3.0 Merge pull request #648 from sc… (compare)

  • Nov 30 08:58
    mergify[bot] closed #648
  • Nov 30 08:55

    mergify[bot] on master

    Update scalafmt-core to 3.2.0 Merge pull request #647 from sc… (compare)

  • Nov 30 08:55
    mergify[bot] closed #647
  • Nov 30 08:53
    scala-steward opened #648
  • Nov 30 08:50
    scala-steward opened #647
  • Nov 28 07:32
    mergify[bot] closed #646
  • Nov 28 07:32

    mergify[bot] on master

    Update cats-kernel-laws, cats-l… Merge pull request #646 from sc… (compare)

  • Nov 28 07:26
    scala-steward opened #646
  • Nov 22 20:30

    mergify[bot] on master

    Update zio-interop-cats to 3.2.… Merge pull request #645 from sc… (compare)

  • Nov 22 20:30
    mergify[bot] closed #645
  • Nov 22 20:23
    scala-steward opened #645
  • Nov 22 13:05

    mergify[bot] on master

    Update scalafmt-core to 3.1.2 Merge pull request #644 from sc… (compare)

  • Nov 22 13:05
    mergify[bot] closed #644
  • Nov 22 13:00
    scala-steward opened #644
  • Nov 15 13:48

    mergify[bot] on master

    Update amqp-client to 5.14.0 Merge pull request #643 from sc… (compare)

  • Nov 15 13:48
    mergify[bot] closed #643
  • Nov 15 13:42
    scala-steward opened #643
  • Nov 13 01:10

    mergify[bot] on master

    Update scalafmt-core to 3.1.1 Merge pull request #642 from sc… (compare)

  • Nov 13 01:10
    mergify[bot] closed #642
Gavin Bisesi
@Daenyth
hmm but previous releases we've done have preserved bincompat in minor releases, rather than updating compatible changes as patch versions
@gvolpe I think I'd like to set a policy going forward of doing bincompat breaks with major versions, and changes that preserve compat being minor or patch. Thoughts?
Gabriel Volpe
@gvolpe
Yeah that should be ideal, go for it :+1:
Gavin Bisesi
@Daenyth
kk
actually before I do that
nvm
I was thinking of using the @data case class replacement library for helping with binary compat but I don't really want to add the dep
will tackle that part later
Gavin Bisesi
@Daenyth

Where does the release thing happen?

I did the release on github and I don't see a new build in here: https://github.com/profunktor/fs2-rabbit/actions

Gabriel Volpe
@gvolpe
Let me see..
Hmm that's odd. The new tag should have triggered a release job like this one: https://github.com/profunktor/fs2-rabbit/actions/runs/257305157
Gabriel Volpe
@gvolpe
I think it might be related to permissions (re: Github Actions being the author of the tag)
Gavin Bisesi
@Daenyth
hm
Gabriel Volpe
@gvolpe
An action in a workflow run can’t trigger a new workflow run. For example, if an action pushes code using the repository’s GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.
Gabriel Volpe
@gvolpe
Found this: release-drafter/release-drafter#550 but still don't know how to solve this
Gabriel Volpe
@gvolpe
I commented on the issue but for now, we could just make a v3.0.1
Gavin Bisesi
@Daenyth
ok
Gabriel Volpe
@gvolpe
Wanna do it to get familiar with the process? Should work this time! :smile:
Anyway, I hope we can fully automate the process. I have set up release drafter in another project but haven't done a release yet, pretty sure the same would happen.
Gavin Bisesi
@Daenyth
Would you mind? I'm pretty swamped right now
if it's just 'make a new release' (myself) then I'm already familiar - that's how I set up the work stuff
v3.0.1 is on its way to Maven Central: https://github.com/profunktor/fs2-rabbit/runs/1270696103
Artem Nikiforov
@nikiforo
Hi all,
Is there any library-like solution to cache connections, channels when publishing for fs2-rabbit?
Gabriel Volpe
@gvolpe
@nikiforo a connection is given as a cats.effect.Resource, there's no need to cache that. The connection will be valid in the use { ... } block.
Unless you have a different use case that I don't understand
Artem Nikiforov
@nikiforo

While googling, I encountered several recommendations, that it's better to share connections, because they are expensive to create.

For example this article mentions, that 13 Tcp packets are used to establish a connection+channel
https://www.cloudamqp.com/blog/2018-01-19-part4-rabbitmq-13-common-errors.html

Artem Nikiforov
@nikiforo
I've also found mentions, that Java Spring has some rabbit ConnectionFactory, but haven't explored that further.
Gabriel Volpe
@gvolpe
That's correct, and it's the same with any other messaging broker, database, etc
cats.effect.Resource gives you fine-grained control over your resource, in this case, the RabbitMQ connection
Share your connection within that use { ... } block, which delimits the resource lifetime
This concept is normally called "shared state". You can give this a read if you're not familiar with it: https://typelevel.org/blog/2018/06/07/shared-state-in-fp.html
There's also a talk by Fabio Labella which expands a bit more on the topic: http://systemfw.org/talks (the one at Scala Italy 2018)
Artem Nikiforov
@nikiforo

Indeed, within .use { ... } and Stream.resource this resource will be used, but if an error occures, I should reopen a connection and use the reopened connection in subsequent actions(just like ResilientStream in resilency package).

And I thought that logic of acquiring the connection should be encapsulated somewhere in ConnectionProvider.

Thanks! I'll watch the video and read the article thoroughly!

Gabriel Volpe
@gvolpe

if an error occures, I should reopen a connection

It's the users' responsibility to handle errors. If you don't want the connection to terminate on errors, have look at handleErrorWith, recoverWith, etc

You can find more about shared-state and other design patterns in this book as well: https://leanpub.com/pfp-scala (included in the first two chapters that can be downloaded for free)
Gavin Bisesi
@Daenyth
AFAIK the fs2-rabbit resource impl uses the built-in auto-recovering channel
so you shouldn't need to do anything
Artem Nikiforov
@nikiforo
Wow, it is documented, that some kind of recovery occures on network errors.
https://www.rabbitmq.com/api-guide.html#recovery
BTW, It seems that a ConnectionFactory is created every time createConnection is evoked
Artem Nikiforov
@nikiforo
I should definetely check that, but I think this isn't the way how createConnection should behave, or should it create ConnectionFactory every on every createConnection?
Gavin Bisesi
@Daenyth
Generally you only createConnection once or few times, though
I think I traced it through and CF doesn't have state
I forget
Artem Nikiforov
@nikiforo
Gavin Bisesi
@Daenyth
@gvolpe Looks like we have some bites on the 'new maintainers' thread. Want to add them?
Gabriel Volpe
@gvolpe
@Daenyth done. I also gave you admin permissions, you should be able to add more maintainers in the future, I guess
Gavin Bisesi
@Daenyth
:+1: thanks