{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/17693","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/17693/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/17693/comments","events_url":"https://api.github.com/repos/akka/akka/issues/17693/events","html_url":"https://github.com/akka/akka/issues/17693","id":86964171,"number":17693,"title":"Provide a \"Source.queue\" as an alternative to `Source.actorRef` that can reject elements","user":{"login":"jrudolph","id":9868,"avatar_url":"https://avatars.githubusercontent.com/u/9868?v=3","gravatar_id":"","url":"https://api.github.com/users/jrudolph","html_url":"https://github.com/jrudolph","followers_url":"https://api.github.com/users/jrudolph/followers","following_url":"https://api.github.com/users/jrudolph/following{/other_user}","gists_url":"https://api.github.com/users/jrudolph/gists{/gist_id}","starred_url":"https://api.github.com/users/jrudolph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrudolph/subscriptions","organizations_url":"https://api.github.com/users/jrudolph/orgs","repos_url":"https://api.github.com/users/jrudolph/repos","events_url":"https://api.github.com/users/jrudolph/events{/privacy}","received_events_url":"https://api.github.com/users/jrudolph/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akka/akka/labels/t:stream","name":"t:stream","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/akka/akka/milestones/53","html_url":"https://github.com/akka/akka/milestones/streams-2.0-M1","labels_url":"https://api.github.com/repos/akka/akka/milestones/53/labels","id":1206581,"number":53,"title":"streams-2.0-M1","description":"","creator":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":83,"state":"closed","created_at":"2015-07-14T07:39:51Z","updated_at":"2015-11-05T15:33:22Z","due_on":null,"closed_at":"2015-11-05T15:33:22Z"},"comments":6,"created_at":"2015-06-10T13:04:20Z","updated_at":"2016-05-09T14:11:24Z","closed_at":"2015-09-07T14:33:44Z","body":"`Source.actorRef` basically implements a queue (by setting buffer sizes) that may overflow at any time. In case of overflow, only the consumer of the elements can be notified but not the sender.\r\n\r\nIf you need a queue that can reject elements if it overflows you need to implement it yourself.\r\n\r\nSee http://zuchos.com/blog/2015/06/10/more-reactive-publisher-aka-publisher-vol-2/ and https://github.com/Zuchos/akka-http-with-streams/blob/blogpost2/src/main/scala/pl/zuchos/example/actors/DataPublisher.scala\r\n\r\nA possible signature could look like this:\r\n\r\n```scala\r\ndef queue[T](bufferSize: Int): Source[T, T => Future[Boolean]] \r\n```\r\n\r\nIt would materialize to a function that can be used to try adding an element to the queue and returns a future that indicates if adding the element was successful."},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/217875267","html_url":"https://github.com/akka/akka/issues/17693#issuecomment-217875267","issue_url":"https://api.github.com/repos/akka/akka/issues/17693","id":217875267,"user":{"login":"drewhk","id":932285,"avatar_url":"https://avatars.githubusercontent.com/u/932285?v=3","gravatar_id":"","url":"https://api.github.com/users/drewhk","html_url":"https://github.com/drewhk","followers_url":"https://api.github.com/users/drewhk/followers","following_url":"https://api.github.com/users/drewhk/following{/other_user}","gists_url":"https://api.github.com/users/drewhk/gists{/gist_id}","starred_url":"https://api.github.com/users/drewhk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewhk/subscriptions","organizations_url":"https://api.github.com/users/drewhk/orgs","repos_url":"https://api.github.com/users/drewhk/repos","events_url":"https://api.github.com/users/drewhk/events{/privacy}","received_events_url":"https://api.github.com/users/drewhk/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T14:11:24Z","updated_at":"2016-05-09T14:11:24Z","body":"What do you mean does not work? Do you have a reproducer and a detailed bug description?"}}