Questions tagged [consumer]

649 questions
0
votes
2 answers

File Copy Tool w/ Producer/Consumer Model

so I was looking over my next school assignment, and I'm baffled. I figured I would come to the experts for some direction. My knowledge on synchronization is severely lacking, and I didn't do so hot on the "mcopyfile" assignment it refers to.…
0
votes
2 answers

Flex BlazeDS consumer not subscribed

My flex frontend is using BlazeDS/Tomcat to collect realtime data. I am using a plain consumer over a standard streaming-amf channel.
MonoThreaded
  • 11,429
  • 12
  • 71
  • 102
0
votes
1 answer

which client receives the message from a queue

if i have one messagequeue and multiple standalone programs which try to receive messages from this queue via sess.receive(); which clientprogram will actually receive the message? how is this decided? thank you
Moonlit
  • 5,171
  • 14
  • 57
  • 95
0
votes
1 answer

Producer/Consumer threads do not give results

I'm doing a CPU scheduling simulator project for my OS course. The program should consist of two threads: producer and consumer threads. The producer thread includes the generator that generates processes in the system and the long term scheduler…
-1
votes
1 answer

Difference between 'void' and ' void' in java method

public static void myMethod(int a, Consumer consumer){// Some code} public static void myMethod(int a, Consumer consumer){// Some code} Difference between 'void' and ' void'
-1
votes
1 answer

Java Generics PECS , add capture ? super cannot be applied to java.util.list

The issue of variance (particularly contravariance) has got me banging my head against the wall for a week. I have finally understood the theory, thanks to a couple of questions on here, and now as soon as I start working on it, I am getting errors…
user16422658
-1
votes
1 answer

Supplier Functional Interface

As we know Consumer functional interface is used in forEach() so similarly does Java has a use case for Supplier other than the custom ones?
-1
votes
1 answer

Producer/consumer with bounded buffer

Could someone check my code and tell me if I am on the right track.. It seems like I am a bit lost.. if you see my errors, please let me know them.. What I am trying to do is to solve bounded buffer using my own semaphores as well as GCD. Thanks in…
canaan
  • 1
  • 1
  • 3
-1
votes
1 answer

Java method that accepts Consumer as parameter - how to use it?

Is there any chance and need to use something like below ? Could you show examples how to use function thats accepts Consumer WebElement ? private static void methodThatAcceptsConsumer (Consumer consumer) { //something here }
javabeginer
  • 1
  • 1
  • 6
-1
votes
1 answer

Saving consumed data to database

I am having a problem with saving data from consumed API to database, so this is my model: @Entity public class Beer { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; private String name; private…
markz
  • 5
  • 1
-1
votes
1 answer

TypeError: '>' not supported between instances of 'float' and 'Synchronized'

if math.fabs(time.time()-start_time) > time_interval : TypeError: '>' not supported between instances of 'float' and 'Synchronized' Code: if __name__ == "__main__": start_time = multiprocessing.Value( 'd', 0.0) time_t =…
-1
votes
2 answers

(Flutter) How to use Consumer and ChangeNotifierProvider correctly ? can't find what is missing

This is the code (Fidev design challenge) step by step copied from source but got an error classes in suspicion are MainPage and LeopardPage have imported all necessary packages Can't figure out what is missing class LeopardPage extends…
seadhant
  • 11
  • 2
-1
votes
1 answer

Flutter : serState() or markNeedBuild() called during build

I have a widget which used to select a date, at beginning it's with 'no date chosen', and the widget in a column below it depends on it [which mean its show a list of timeSlots of Data if I selected a date] But I got a setState called during build…
Ahmad Mohy
  • 391
  • 2
  • 6
  • 18
-1
votes
1 answer

how to pass a String value to the following function

I have the following function with a consumer Collection abc; @Override public void something(Consumer visitor) { abc.add(visitor); } I want to add values received to something function in the abc list. but I don't know…
Ahmed Ali
  • 37
  • 6
-1
votes
1 answer

Failover mechanism for JMS consumer microservice is down

We are using activemq for micro services message broker. My query is about how to build failover mechanism for consumer service. If the consumer service is down , how to proceed further. Can we do somethign like hystrix or any other failover/circuit…